private static HPValue[] ReadHPData(BinaryReader br) { string hpString = ReadString(br); string[] values = hpString.Split(','); HPValue[] result = new HPValue[values.Length]; int i = 0; foreach (string s in values) { string[] spl = s.Split('|'); if (spl.Length < 2) { continue; } result[i] = new HPValue() { Time = Convert.ToInt32(spl[0]), Value = Convert.ToSingle(spl[1]), }; i++; } return(result); }
void Update() { hpv = GameObject.Find("HP").GetComponent <HPValue>(); if (Input.GetKeyDown("z")) { hpv.SetTextValue(damage); } }
public CharacterClass(int BAB, int FORT, int REF, int WILL, int HP, string className) { this.BAB = BAB; this.FORT = FORT; this.WILL = WILL; this.REF = REF; this.HP = new HPValue(HP); this.className = className; this.lvl = 1; Arts = new int[5]; Arts [0] = 1; for (int i = 1; i < Arts.Length; i++) { Arts[i] = 0; } SkillList = new Skill[5, 5]; }