Skip to content

Commit

Permalink
Flashlight input changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaybenot committed Feb 5, 2023
1 parent c160970 commit aab64e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
22 changes: 1 addition & 21 deletions Assets/GameInputs.inputactions
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@
"interactions": "",
"initialStateCheck": true
},
{
"name": "Flashlight",
"type": "Button",
"id": "f9e5f8b2-9f85-4483-ad7e-f5c9dbe702a1",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Focus",
"type": "Button",
Expand Down Expand Up @@ -127,17 +118,6 @@
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "e884e79f-1153-41ab-bbc8-923a828e6ba8",
"path": "<Mouse>/leftButton",
"interactions": "",
"processors": "",
"groups": "",
"action": "Flashlight",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "35bfd08b-7f3e-4de8-944d-f0b31b8e1218",
Expand All @@ -163,7 +143,7 @@
{
"name": "",
"id": "d98ac030-d130-4948-aa77-4417d0b3d01d",
"path": "<Keyboard>/c",
"path": "<Mouse>/leftButton",
"interactions": "",
"processors": "",
"groups": "",
Expand Down
13 changes: 0 additions & 13 deletions Assets/Scripts/Player/PlayerInputs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
public class PlayerInputs : MonoBehaviour
{
private const float inputEpsilon = 0.5f;
[SerializeField] private GameObject[] flashlights = new GameObject[2];
[SerializeField] private PlayerSFX playerSFX;

public void RotateCamera(InputAction.CallbackContext context)
{
Expand All @@ -25,17 +23,6 @@ public void RotateCamera(InputAction.CallbackContext context)
Player.Singleton.RotateCamera(Player.Singleton.CurrentRotationIndex - 1);
}

public void ToggleFlashlight(InputAction.CallbackContext context)
{
if (!context.performed || !GameState.Singleton.IsPlaying)
return;

if (GameState.paused)
return;

Flashlight.Singleton.Toggle();
}

public void Focus(InputAction.CallbackContext context)
{
if (!GameState.Singleton.IsPlaying)
Expand Down

0 comments on commit aab64e1

Please sign in to comment.