private void Update()
 {
     //follow the movement behaviour based on path length and looping
     ActivateBehaviour();
     //enemies with turret system should only be allowed to shot when the enemy is in the same screen area
     //as the play, a.k.a. the player area
     if (IsEnemyInView() || shipTurrets.test == true)
     {
         //get the current speed of the enemy as it is used by the turret system to fire bullets
         shipTurrets.GetShipSpeed(thisShip.GetCurrentSpeed());
         //start the shooting routine, that follows rules set in the editor
         shipTurrets.ShootingRoutine();
     }
 }
Ejemplo n.º 2
0
 public void AllowShooting()
 {
     allowShot = true;
     attachTurretSystem.GetShipSpeed(currentSpeed);
 }