Exemplo n.º 1
0
 void Shoot(Transform target)
 {
     elapsedTime += Time.deltaTime;
     if (elapsedTime >= shotTime)
     {
         elapsedTime = 0f;
         bulletManager.AllocateBullet(pos, target, BulletManager.BulletType.turret);
     }
 }
Exemplo n.º 2
0
 public override void Shoot(Transform target)
 {
     if (null == target)
     {
         return;
     }
     shotElapsed += Time.deltaTime;
     if (shotElapsed > shotTimer)
     {
         shotElapsed = 0f;
         bulletManager.AllocateBullet(transform.position, target, BulletManager.BulletType.enemy);
     }
 }