Exemplo n.º 1
0
        private static void Game_OnUpdate(EventArgs args)
        {
            int newLevel = ObjectManager.Player.Level;
            if (_level < newLevel)
            {
                var levelupArgs = new CustomEvents.Unit.OnLevelUpEventArgs
                {
                    NewLevel = newLevel,
                    RemainingPoints = newLevel - _level
                };
                _level = newLevel;

                UnitOnOnLevelUp(ObjectManager.Player, levelupArgs);
            }
        }
Exemplo n.º 2
0
 private void OnGameUpdate(EventArgs args)
 {
     int newLevel = ObjectManager.Player.Level;
     if (_level < newLevel)
     {
         CustomEvents.Unit.OnLevelUpEventArgs levelupArgs = new CustomEvents.Unit.OnLevelUpEventArgs
         {
             NewLevel = newLevel,
             RemainingPoints = newLevel - _level
         };
         _level = newLevel;
         OnLevelUp(ObjectManager.Player, levelupArgs);
     }
 }