예제 #1
0
    // Handler for enemny object to take and turn into exp.
    public void GrantExperience(int amount)
    {
        CurrentExperience += amount;

        while (CurrentExperience >= RequiredExperience)
        {
            CurrentExperience -= RequiredExperience;
            Level++;
        }
        UIEventHandler.OnPlayerLevelChanged();
    }