Пример #1
0
        private void GiveExperienceReward()
        {
            if (m_Experience == null || experienceReward == 0)
            {
                return;
            }

            m_Experience.GainExperience(experienceReward);
        }
Пример #2
0
        void AwardExperience(GameObject instigator)
        {
            Experience experience = instigator.GetComponent <Experience>();

            if (experience == null)
            {
                return;
            }
            experience.GainExperience(GetComponent <BaseStats>().GetStat(Stat.ExperienceReward));
        }
Пример #3
0
        private void RewardExperience(GameObject instigator)
        {
            Experience experience = instigator.GetComponent <Experience>();

            if (experience == null)
            {
                return;
            }

            experience.GainExperience(_baseStat.GetStat(Enums.StatsEnum.ExperienceReward));
        }
        public void ExperienceAward()
        {
            if (_baseStatsGetter == null || !_playerMarker)
            {
                return;
            }

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

            playerExperience.GainExperience(_baseStatsGetter.GetStat(Stat.ExperienceReward));
        }
Пример #5
0
    private void AwardXP(GameObject initiator)
    {
        Experience experience = initiator.GetComponent <Experience>();

        if (experience == null)
        {
            return;
        }

        experience.GainExperience(baseStats.GetStat(Stats.AwardXP));
    }
Пример #6
0
        /// <summary>
        ///
        /// This method will be called When player killed an enemy
        /// and gain experience.
        ///
        /// </summary>
        /// <param name="instigator">
        /// Who will gain the experience.
        /// </param>
        private void AwardExperience(GameObject instigator)
        {
            if (!instigator.CompareTag("Player"))
            {
                return;
            }
            Experience exp = instigator.GetComponent <Experience>();

            if (!exp)
            {
                return;
            }

            exp.GainExperience(
                GetComponent <BaseStats>().GetStat(Stat.ExperienceReward));
        }