Commit 9c625f66 by Philipp Adolf

Allow dashing in arbitrary directions

parent c3cb9d31
......@@ -178,6 +178,14 @@ public class PlayerControl : MonoBehaviour
}
float verticalDashDirection = 0.0f;
if (Input.GetKey (keyCodes[(int)Keys.Up]))
{
verticalDashDirection = 1.0f;
}
else if (Input.GetKey (keyCodes[(int)Keys.Down]))
{
verticalDashDirection = -1.0f;
}
if (horizontalDashDirection != 0.0f || verticalDashDirection != 0.0f)
dashDirection = new Vector2(horizontalDashDirection, verticalDashDirection);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment