1 Commits

Author SHA1 Message Date
2c93456a19 Fast fuckers will run away on taking damage 2024-10-28 16:17:27 -07:00
2 changed files with 5 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ public class FastFucker : Ratbot
bool attack = true;
void Update() {
if (attack)
MoveTowardsPlayer(moveSpeed*3);
MoveTowardsPlayer(moveSpeed*2);
else
MoveAwayFromPlayer(moveSpeed);
}
@@ -27,4 +27,8 @@ public class FastFucker : Ratbot
yield return new WaitForSeconds (1F);
attack = true;
}
new void Damage (float hurtyAmount) {
RunAway();
base.Damage(hurtyAmount);
}
}

View File

@@ -46,7 +46,6 @@ public class Ratbot : MonoBehaviour
// Die if health below zero
public void Damage(float hurtyAmount) {
Debug.Log(hurtyAmount);
health -= hurtyAmount;
if (health <= 0) {
Destroy(gameObject);