aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'nGJ2019/Assets')
-rw-r--r--nGJ2019/Assets/Scripts/DragonMovement.cs28
1 files changed, 27 insertions, 1 deletions
diff --git a/nGJ2019/Assets/Scripts/DragonMovement.cs b/nGJ2019/Assets/Scripts/DragonMovement.cs
index 9ae8fbb..f2c1cb5 100644
--- a/nGJ2019/Assets/Scripts/DragonMovement.cs
+++ b/nGJ2019/Assets/Scripts/DragonMovement.cs
@@ -169,6 +169,7 @@ public class DragonMovement : MonoBehaviour
void Update()
{
+ // keyboard scheme
if(Input.GetKey("w"))
moveUp();
if(Input.GetKey("a"))
@@ -192,6 +193,32 @@ public class DragonMovement : MonoBehaviour
turnSpread();
if(Input.GetKeyUp("k"))
turnAntiSpread();
+
+
+ // xbox scheme
+ if(Input.GetAxis("JoystickY") > 0.5f)
+ moveUp();
+ if(Input.GetAxis("JoystickX") < -0.5f)
+ moveLeft();
+ if(Input.GetAxis("JoystickY") < -0.5f)
+ moveDown();
+ if(Input.GetAxis("JoystickX") > 0.5f)
+