void labelStatsOther(Other_Stats stats, TextMeshProUGUI text) { if (stats.hp > 0) { text.text += "\n" + stats.hp; } if (stats.regen_cHP > 0) { text.text += "\n" + stats.regen_cHP + " %"; } if (stats.restoration_HP > 0) { text.text += "\n" + stats.restoration_HP + " %"; } if (stats.mp > 0) { text.text += "\n" + stats.mp; } if (stats.regen_cMP > 0) { text.text += "\n" + stats.regen_cMP + " %"; } if (stats.restoration_MP > 0) { text.text += "\n" + stats.restoration_MP + " %"; } }
bool boolStatsOther(Other_Stats stats) { if (stats.hp > 0) { return(true); } if (stats.regen_cHP > 0) { return(true); } if (stats.restoration_HP > 0) { return(true); } if (stats.mp > 0) { return(true); } if (stats.regen_cMP > 0) { return(true); } if (stats.restoration_MP > 0) { return(true); } return(false); }
void CalculateOther(Other_Stats stat) { currentStats.Other.regen_cHP += stat.regen_cHP; currentStats.Other.regen_cMP += stat.regen_cMP; currentStats.Other.restoration_HP += stat.restoration_HP; currentStats.Other.restoration_MP += stat.restoration_MP; currentStats.Other.hp += stat.hp; currentStats.Other.mp += stat.mp; }
public static void ViewOther(Other_Stats selected) { selected.hp = EditorGUILayout.IntField("HP", selected.hp); selected.regen_cHP = EditorGUILayout.IntField("HP camp regen", selected.regen_cHP); selected.restoration_HP = EditorGUILayout.IntField("HP item restoration", selected.restoration_HP); GUILayout.Space(10); selected.mp = EditorGUILayout.IntField("MP", selected.mp); selected.regen_cMP = EditorGUILayout.IntField("MP camp regen", selected.regen_cMP); selected.restoration_MP = EditorGUILayout.IntField("MP item restoration", selected.restoration_MP); }
public static CharacterStats CalculateOther(CharacterStats current, Other_Stats stat) { current.Other.regen_cHP += stat.regen_cHP; current.Other.regen_cMP += stat.regen_cMP; current.Other.restoration_HP += stat.restoration_HP; current.Other.restoration_MP += stat.restoration_MP; current.Other.hp += stat.hp; current.Other.mp += stat.mp; return(current); }
public Stats() { Base = new Base_Stats(); Battle = new Battle_Stats(); Ability = new Ability_Stats(); Equipment = new Equipment_Stats(); Resistance = new Resistance_Stats(); Other = new Other_Stats(); AtkState = new List <State_Rate>(); ResistState = new List <State_Rate>(); }
public void UpdateStats() { Base = new Base_Stats(); Battle = new Battle_Stats(); Ability = new Ability_Stats(); Equipment = new Equipment_Stats(); Resistance = new Resistance_Stats(); Other = new Other_Stats(); AtkState = new List <State_Rate>(); ResistState = new List <State_Rate>(); dmgWeapons[0] = new DmgWeapon(); dmgWeapons[1] = new DmgWeapon(); }
void ViewOtherPrecent(Other_Stats selected) { selected.hp = EditorGUILayout.IntField("HP %", selected.hp); GUILayout.Space(10); selected.mp = EditorGUILayout.IntField("MP %", selected.mp); }
public Precent_Stats() { Base = new Base_Stats(); Battle = new Battle_Stats(); Other = new Other_Stats(); }
void PrecentOther(Other_Stats stat) { currentStats.Other.hp += (int)(currentStats.Other.hp * (float)stat.hp / 100f); currentStats.Other.mp += (int)(currentStats.Other.mp * (float)stat.mp / 100f); }
static CharacterStats PrecentOther(CharacterStats current, Other_Stats stat) { current.Other.hp += (int)(current.Other.hp * (float)stat.hp / 100f); current.Other.mp += (int)(current.Other.mp * (float)stat.mp / 100f); return(current); }