//-------helper protected void UpdateStats() { ResetBounuses(); InitMaxStats(); ApplyEquipmentsUtilities(); ReloadWeaponWC(); InitOnCallEvent(); ApplyBounuses(); InitPassives(); for (int i = 0; i < Stats.Size; i++) { if ((int)STATSTYPE.HEALTH == i) { if (CurrStats.Get(i) > MaxStats.Get(i)) { CurrStats.Set(i, MaxStats.Get(i)); } } else if ((int)STATSTYPE.ESSENSE == i) { if (CurrStats.Get(i) > MaxStats.Get(i)) { CurrStats.Set(i, MaxStats.Get(i)); } } else { CurrStats.Set(i, MaxStats.Get(i)); } } }
protected void InitCurrStats() { for (int i = 0; i < Stats.Size; i++) { CurrStats.Set(i, MaxStats.Get(i)); } }
protected void CheckLevelUp() { if (PlayerData.lvl >= LvlExpModule.LvlCap) { return; } if (PlayerData.exp >= NextLevelExp) { PlayerData.lvl++; PlayerData.exp = 0; CurrStats.Set(STATSTYPE.HEALTH, MaxStats.Get(STATSTYPE.HEALTH)); CurrStats.Set(STATSTYPE.ESSENSE, MaxStats.Get(STATSTYPE.ESSENSE)); NextLevelExp = LvlExpModule.GetRequiredExp(PlayerData.lvl + 1); AudioSource.PlayClipAtPoint(LevelUpSFX, transform.position, GameManager.SFX_Volume); PlayerData.SkillPoints++; } }