diff --git a/Assets/Scripts/InteractableObjects/Enemy.cs b/Assets/Scripts/InteractableObjects/Enemy.cs index fa09ad1..c49559f 100644 --- a/Assets/Scripts/InteractableObjects/Enemy.cs +++ b/Assets/Scripts/InteractableObjects/Enemy.cs @@ -20,6 +20,7 @@ namespace Assets.Scripts.InteractableObjects Stopwatch jumpTimer; bool followsPlayer; Fight fight; + int jumpResetModifier; // Start is called before the first frame update void Start() @@ -44,6 +45,7 @@ namespace Assets.Scripts.InteractableObjects { jumpTimer.Start(); isJumping = true; + jumpResetModifier = rand.Next(-500, 500); Vector3 jumpVector; if (followsPlayer) { @@ -57,7 +59,7 @@ namespace Assets.Scripts.InteractableObjects } gameObject.GetComponent().AddForce(jumpVector, ForceMode.Impulse); } - if (jumpTimer.ElapsedMilliseconds >= 5000) + if (jumpTimer.ElapsedMilliseconds >= 5000 + jumpResetModifier) { jumpTimer.Reset(); isJumping = false;