Пример #1
0
 public void toDazeState()
 {
     enemy.agent.enabled = false;
     enemy.shouldBeDazed = false;
     enemy.isDazed       = true;
     enemy.dazeTime      = Time.time;
     enemy.originalColor = enemy.GetComponentInChildren <MeshRenderer>().material.color;
     enemy.GetComponentInChildren <MeshRenderer>().material.color = Color.blue;
     enemy.currentState = enemy.dazeState;
 }
Пример #2
0
 public void UpdateState()
 {
     if (Time.time > enemy.dazeTime + 2f)
     {
         enemy.GetComponentInChildren <MeshRenderer>().material.color = enemy.originalColor;
         ToChaseState();
     }
 }