public void ExperienceAward()
        {
            if (_baseStatsGetter == null || !_playerMarker)
            {
                return;
            }

            Experience playerExperience = _playerMarker.GetComponent <Experience>();

            playerExperience.GainExperience(_baseStatsGetter.GetStat(Stat.ExperienceReward));
        }
Пример #2
0
 private void Awake()
 {
     _player             = FindObjectOfType <PlayerMarker>();
     _playerMaxXpHandler = _player?.GetComponent <PlayerMaxXpHandler>();
     _experience         = _player?.GetComponent <Experience>();
 }
 private void Awake()
 {
     _playerMarker         = FindObjectOfType <PlayerMarker>();
     _playerXpLevelHandler = _playerMarker?.GetComponent <PlayerXpLevelHandler>();
     gameCurrentLevel      = _playerXpLevelHandler.CurrentLevel;
 }
 void Awake()
 {
     _player     = FindObjectOfType <PlayerMarker>();
     _experience = _player?.GetComponent <Experience>();
     _xpText     = GetComponent <TextMeshProUGUI>();
 }
Пример #5
0
 void Awake()
 {
     _player             = FindObjectOfType <PlayerMarker>();
     _playerMaxXpHandler = _player?.GetComponent <PlayerMaxXpHandler>();
     _xpText             = GetComponent <TextMeshProUGUI>();
 }
Пример #6
0
 void Awake()
 {
     _player     = FindObjectOfType <PlayerMarker>();
     _health     = _player?.GetComponent <Health>();
     _healthText = GetComponent <TextMeshProUGUI>();
 }
Пример #7
0
 //this method could be overriden in a subclass to implement specific pickups
 //as an example, this is an ammo pickup
 protected virtual void Pick(PlayerMarker player)
 {
     Debug.Log("Picked up");
     player.GetComponent <PlayerAttack>().Weapon.Ammo += 10;
 }