public Health(ActorInitializer init, HealthInfo info) { Info = info; MaxHP = info.HP; hp = init.Contains <HealthInit>() ? (int)(init.Get <HealthInit, float>() * MaxHP) : MaxHP; DisplayHp = hp; }
public Health(ActorInitializer init, HealthInfo info) { Info = info; MaxHP = info.HP > 0 ? info.HP : 1; hp = init.Contains <HealthInit>() ? init.Get <HealthInit, int>() * MaxHP / 100 : MaxHP; DisplayHp = hp; }