Exemple #1
0
        public void FireEnd()
        {
            if (bulletObj != null)
            {
                Destroy(bulletObj.gameObject);
                bulletObj = null;
            }

            isFire = false;
        }
Exemple #2
0
 public void FireStart()
 {
     if (normalTurretCtrl.GetAngleToTarget() > angleLimit || bulletObj != null)
     {
         return;
     }
     bulletObj = Instantiate(bullet, Muzzle.position, Muzzle.rotation);
     bulletObj.transform.parent = Muzzle;
     bulletObj.Init(normalTurretCtrl);
     isFire = true;
 }