Beispiel #1
0
    /// <summary>
    /// Adds exp.
    /// </summary>
    /// <param name="exp">Exp.</param>
    public void AddExp(int exp)
    {
        LevelExpMetaData data = LevelExpMetaData.Load(true);

        if (data.AddExp(exp))
        {
            UpdateLevelExp();
        }
    }
Beispiel #2
0
    /// <summary>
    /// Updates the level exp.
    /// </summary>
    void UpdateLevelExp()
    {
        LevelExpMetaData data = LevelExpMetaData.Load(true);

        playerMaxLevel       = data.playerMaxLevel;
        playerCurrentLevel   = data.playerCurrentLevel;
        playerBaseExp        = data.playerBaseExp;
        playerExpToNextLevel = data.playerExpToNextLevel;
        playerCurrentExp     = data.playerCurrentExp;

        EventManager.GetInstance().ExecuteEvent <EventUpdateLevelExp> (new EventUpdateLevelExp(playerCurrentLevel, playerCurrentExp, playerExpToNextLevel));
    }