Ejemplo n.º 1
0
 private void Shoot()
 {
     if (currentTask == TurretPhase.Patrol)
     {
         StopCoroutine("Patrolling");
         currentTask = TurretPhase.Shoot;
         StartCoroutine("Shooting");
         StartCoroutine("TargetFollow");
     }
 }
Ejemplo n.º 2
0
 private void Patrol()
 {
     cannon.transform.rotation.eulerAngles.Set(0.0f, 90.0f, 0.0f);
     if (currentTask == TurretPhase.Patrol)
     {
         StartCoroutine("Patrolling");
     }
     else if (currentTask == TurretPhase.Shoot)
     {
         StopCoroutine("Shooting");
         StopCoroutine("TargetFollow");
         currentTask = TurretPhase.Patrol;
         StartCoroutine("Patrolling");
     }
 }
Ejemplo n.º 3
0
 public void Init()
 {
     currentTask     = TurretPhase.Patrol;
     turretShotTimer = new WaitForSeconds(turretShootDelay);
     Patrol();
 }