private void Awake()
 {
     _BDV               = BombDroneValues.Instance;
     _playerManager     = PlayerManager.Instance;
     _droneActions      = DroneActions.Instance;
     _bombDrones        = CreateList(_BDV.prefab, _BDV.poolSize);
     _waitBetweenSpawns = new WaitForSeconds(_BDV.timeBetweenSpawns);
 }
Exemplo n.º 2
0
    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>();
    }