/// <summary> /// Adds exp. /// </summary> /// <param name="exp">Exp.</param> public void AddExp(int exp) { LevelExpMetaData data = LevelExpMetaData.Load(true); if (data.AddExp(exp)) { UpdateLevelExp(); } }
/// <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)); }