private void Awake() { _BDV = BombDroneValues.Instance; _playerManager = PlayerManager.Instance; _droneActions = DroneActions.Instance; _bombDrones = CreateList(_BDV.prefab, _BDV.poolSize); _waitBetweenSpawns = new WaitForSeconds(_BDV.timeBetweenSpawns); }
void Awake() { GameObject bombDroneValuesObject = GameObject.FindWithTag("ScriptManager"); if (bombDroneValuesObject != null) { _BDVRef = bombDroneValuesObject.GetComponent <BombDroneValues>(); } else { Debug.Log("Cannot find BombDroneValues script"); } _camPosition = _BDVRef.cam.transform.position; _this = this.gameObject; _agent = _this.GetComponent <NavMeshAgent>(); }