Started working on turrets
This commit is contained in:
@@ -50,6 +50,15 @@
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Interact",
|
||||
"type": "Button",
|
||||
"id": "078993f5-6702-4414-915c-32c57876371c",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
@@ -250,6 +259,28 @@
|
||||
"action": "Shoot",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "a9baba30-91b4-407d-97de-d4ad852e5674",
|
||||
"path": "<Keyboard>/e",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";KeyboardMouse",
|
||||
"action": "Interact",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "70a45904-c5ee-453e-a28b-05591c9e3014",
|
||||
"path": "<Gamepad>/buttonWest",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Interact",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace StarterAssets
|
||||
public bool jump;
|
||||
public bool sprint;
|
||||
public bool shoot;
|
||||
public bool interact;
|
||||
|
||||
[Header("Movement Settings")]
|
||||
public bool analogMovement;
|
||||
@@ -48,6 +49,10 @@ namespace StarterAssets
|
||||
{
|
||||
ShootInput(value.isPressed);
|
||||
}
|
||||
public void OnInteract(InputValue value)
|
||||
{
|
||||
InteractInput(value.isPressed);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -74,6 +79,10 @@ namespace StarterAssets
|
||||
{
|
||||
shoot = newShootState;
|
||||
}
|
||||
public void InteractInput(bool newInteractState)
|
||||
{
|
||||
interact = newInteractState;
|
||||
}
|
||||
|
||||
private void OnApplicationFocus(bool hasFocus)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user