Commit ddc27904 by Philipp Adolf

Prevent players from unintentionally dashing

This fixes #4
parent c1783b3b
...@@ -66,6 +66,10 @@ public class PlayerControl : MonoBehaviour ...@@ -66,6 +66,10 @@ public class PlayerControl : MonoBehaviour
//in der szene muss fuer jeden spieer so ein InputMapping"nr" sein: //in der szene muss fuer jeden spieer so ein InputMapping"nr" sein:
inputMapping = GameObject.Find("InputMapping" + playerNumber).GetComponent<PlayerInputMapping>(); inputMapping = GameObject.Find("InputMapping" + playerNumber).GetComponent<PlayerInputMapping>();
GetComponent<PlayerHealth>().init(playerNumber); GetComponent<PlayerHealth>().init(playerNumber);
// prevent players from dashing due to pressing the dash button to start the game
lastDashStart = Time.time - dashCompletionTime;
currentDashCoolDown = 0.25f;
} }
void OnCollisionEnter2D(Collision2D coll) void OnCollisionEnter2D(Collision2D coll)
......
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