Esempio n. 1
0
        private void UpdateLevel()
        {
            var oldLevel = Level;

            Level = (int)(MaxLevel * ExperienceLevelCurve.Evaluate((float)CurrentExperience / MaxExperience));
            if (Level > oldLevel)
            {
                LevelEvent.Trigger(LevelEventType.LevelUp, gameObject, Level, MaxLevel);
            }
        }
Esempio n. 2
0
 public void OnMMEvent(LevelEvent levelEvent)
 {
     if (levelEvent.Target != gameObject)
     {
         return;
     }
     switch (levelEvent.Type)
     {
     case LevelEventType.LevelUp:
         LevelUpFeedbacks?.PlayFeedbacks(transform.position, levelEvent.Level);
         break;
     }
 }
Esempio n. 3
0
 private void TriggerEvent()
 {
     LevelEvent.Trigger(Type, Target, Level, MaxLevel);
 }