private void Awake() { _weaponSlot = transform.root.GetComponentInChildren <PlayerWeaponSlot>(); _grenadeSlot = transform.root.GetComponentInChildren <PlayerGrenadeSlot>(); _flashlight = transform.root.GetComponentInChildren <PlayerFlashlight>(); _weaponSlot.OnWeaponAttack.AddListener(UpdateAmmoHUD); _grenadeSlot.OnGrenadeChanged.AddListener(UpdateGrenadeHUD); }
void Awake() { _animator = GetComponent <PlayerAnimator>(); _inventory = GetComponentInChildren <PlayerInventory>(); _flashlight = GetComponentInChildren <PlayerFlashlight>(); _weaponSlot = GetComponentInChildren <PlayerWeaponSlot>(); _playerStatus.isWalking = true; }