using Kryz.CharacterStats; 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; //character.MaxHealth.RemoveAllModifiersFromSource(GameConstants.ObjectSources.LevelSource); // //character.MaxHealth.AddModifier(new StatModifier(baseMaxValue * currentLevel * GameConstants.CharacterStatsBalancing.BaseMaxHealthGrowthPerLevel, StatModType.Flat, GameConstants.ObjectSources.LevelSource)); maxValue = character.MaxHealth.Value; CalculateRegenValueBasedOnStat(); onMaxHealthChanged.Invoke(maxValue); } }