public void SetStats(BaseCombatData cd) { texts[1].Text = cd.AttackDamage + "/" + cd.CriticalDamage; texts[3].Text = cd.MinRange + "-" + cd.MaxRange; texts[5].Text = cd.AttackTimer.ToString(); texts[7].Text = cd.Armor.ToString(); texts[9].Text = (cd.CriticalChance * 100f) + "%"; }
public static void Serialize(BinaryWriter s, BaseCombatData data) { s.Write(data.MinRange); s.Write(data.MaxRange); s.Write(data.AttackDamage); s.Write(data.CriticalDamage); s.Write(data.AttackTimer); s.Write(data.Armor); s.Write(data.CriticalChance); }
public static void Deserialize(BinaryReader s, BaseCombatData data) { data.MinRange = s.ReadInt32(); data.MaxRange = s.ReadInt32(); data.AttackDamage = s.ReadInt32(); data.CriticalDamage = s.ReadInt32(); data.AttackTimer = s.ReadSingle(); data.Armor = s.ReadInt32(); data.CriticalChance = s.ReadDouble(); }