private void GetNextTurret()
 {
     if (Turrets.Count == 0) return;
     if (_currentTurret != null)
         Destroy(_currentTurret.gameObject);
     _currentTurret = Instantiate(Turrets[0]);
     _currentTurret.gameObject.transform.SetParent(transform);
     _currentTurret.gameObject.transform.position = TurretSpawn.position;
     _currentTurret.AssignTargetHandler(_targetHandler);
     Turrets.Remove(Turrets[0]);
 }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     turret = GetComponentInParent <TurretPivot>();
 }
Beispiel #3
0
 // Use this for initialization
 void Start () {
     firing = GetComponentInChildren<Firing>();
     barrel = GetComponentInChildren<BarrelPivot>();
     turret = GetComponentInChildren<TurretPivot>();
 }