public void FireEnd() { if (bulletObj != null) { Destroy(bulletObj.gameObject); bulletObj = null; } isFire = false; }
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; }