private void Awake() { _ADV = AttackDroneValues.Instance; _playerManager = PlayerManager.Instance; _droneActions = DroneActions.Instance; _attackDrones = CreateList(_ADV.prefab, _ADV.poolSize); _timeBetweenSpawns = new WaitForSeconds(_ADV.timeBetweenSpawns); }
void Awake() { GameObject attackDroneValuesObject = GameObject.FindWithTag("ScriptManager"); if (attackDroneValuesObject != null) { _ADVRef = attackDroneValuesObject.GetComponent <AttackDroneValues>(); } else { Debug.Log("Cannot find AttackDroneValues script"); } _this = this.gameObject; _agent = _this.GetComponent <NavMeshAgent>(); _isShot = false; _glowRend = FindChildWithTag("Glow", _this).GetComponent <Renderer>(); _defaultGlowColor = _glowRend.material.color; }