Ejemplo n.º 1
0
 void Start()
 {
     movement = GetComponent <EnemyMovment> ();
     sight    = GetComponent <EnemySight> ();
     weapon   = GetComponent <EnemyAttack> ();
     nearby   = GetComponent <EnemyNearby> ();
     cState   = State.Default;
     movement.ReturnToPatrol();          //Start Patroling
     prevState = cState;
 }
Ejemplo n.º 2
0
 private void ToDefault()
 {
     if (cState != State.Default)
     {
         weapon.Discard();
         prevState = cState;
         cState    = State.Default;
         movement.ReturnToPatrol();
         count = 0;
     }
 }