aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'nGJ2019')
-rw-r--r--nGJ2019/Assets/Scripts/DragonMovement.cs20
-rw-r--r--nGJ2019/ProjectSettings/InputManager.asset96
2 files changed, 113 insertions, 3 deletions
diff --git a/nGJ2019/Assets/Scripts/DragonMovement.cs b/nGJ2019/Assets/Scripts/DragonMovement.cs
index f2c1cb5..f3ae1d5 100644
--- a/nGJ2019/Assets/Scripts/DragonMovement.cs
+++ b/nGJ2019/Assets/Scripts/DragonMovement.cs
@@ -14,6 +14,8 @@ public class DragonMovement : MonoBehaviour
public HealthBar healthBar;
+ private float hurtCooldown = 0;
+
private SwarmSystem swarm;
private enum State {normal, swirl, slim, spread};
@@ -169,6 +171,9 @@ public class DragonMovement : MonoBehaviour
void Update()
{
+ if(hurtCooldown < 0)
+ hurtCooldown -= Time.deltaTime;
+
// keyboard scheme