Skip to content

Commit

Permalink
Playback added.
Browse files Browse the repository at this point in the history
The functionality to playback the movements done by a player is added. Now after doing some movements and pressing the button plays back all the inputs in an sequential order.
  • Loading branch information
SomeGareebGuy committed Aug 3, 2023
1 parent d34f721 commit 19e7279
Show file tree
Hide file tree
Showing 8 changed files with 490 additions and 33 deletions.
8 changes: 8 additions & 0 deletions Jam/.idea/.idea.Jam/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Jam/.idea/.idea.Jam/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 24 additions & 4 deletions Jam/Assets/-playerInput.inputactions
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "Attack",
"type": "Button",
"id": "3e6a6cac-3231-4cad-88fa-52a9f252250b",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
Expand All @@ -30,7 +39,7 @@
{
"name": "up",
"id": "bdd8d1f5-eecc-41a5-91b9-d819cba8db65",
"path": "<Keyboard>/w",
"path": "<Keyboard>/upArrow",
"interactions": "",
"processors": "",
"groups": "",
Expand All @@ -41,7 +50,7 @@
{
"name": "down",
"id": "070b2353-6175-4e0e-abdd-9a4aaac0ff27",
"path": "<Keyboard>/s",
"path": "<Keyboard>/downArrow",
"interactions": "",
"processors": "",
"groups": "",
Expand All @@ -52,7 +61,7 @@
{
"name": "left",
"id": "b17c5df5-4638-468d-83c1-b5acf93c9cbf",
"path": "<Keyboard>/a",
"path": "<Keyboard>/leftArrow",
"interactions": "",
"processors": "",
"groups": "",
Expand All @@ -63,13 +72,24 @@
{
"name": "right",
"id": "6e6eb5e7-849f-47ab-a947-01a78b59f7a5",
"path": "<Keyboard>/d",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",
"groups": "",
"action": "Movement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "e520e861-e63e-4dd0-8946-9458cf6a268c",
"path": "<Keyboard>/z",
"interactions": "",
"processors": "",
"groups": "",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
}
]
}
Expand Down
20 changes: 20 additions & 0 deletions Jam/Assets/PlayRecording.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayRecording : MonoBehaviour
{
public TestingMovement _player;
// Start is called before the first frame update
void Start()
{
_player = GameObject.FindGameObjectWithTag("Player").GetComponent<TestingMovement>();
}

// Update is called once per frame
public void ChangeRecording()
{
_player.recording = false;
_player.StartPlayback();
}
}
11 changes: 11 additions & 0 deletions Jam/Assets/PlayRecording.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 19e7279

Please sign in to comment.