Pedro Gomes 4a7430533a Character Stats Revamp (WIP)
- created secondary stats
- added characterStatsBalancing constants
2024-08-11 22:15:23 +01:00

26 lines
711 B
C#

using Kryz.CharacterStats.Examples;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerHealth : Health
{
int currentLevel;
protected override void Awake()
{
base.Awake();
}
public override void CalculateMaxValueBasedOnStat()
{
currentLevel = ((PlayerCharacterStats)character).level.currentLevel - 1;
maxValue = (baseMaxValue + (baseMaxValue * currentLevel * GameConstants.CharacterStatsBalancing.BaseMaxHealthGrowthPerLevel)) + character.Vitality.Value * GameConstants.CharacterStatsBalancing.VitalityToHealthRate;
CalculateRegenValueBasedOnStat();
onMaxHealthChanged.Invoke(maxValue);
}
}