Example #1
0
 public void OnHit(HitInfo info)
 {
     if (killable.GetHealth() <= 1)
     {
         Destroy(this.GetComponent <EnemyChaseController>());
         Destroy(head);
         EnemyFleeController newController = this.gameObject.AddComponent <EnemyFleeController>();
         newController.direction = info.direction;
     }
 }