private static void LoadPlayer(String line, BattleScreen BS) { char[] delims = { '<', '>' }; String[] tokens = line.Substring(8).Split(delims); String texture = tokens[1]; BattleScreenPlayer player = new BattleScreenPlayer(texture, BS); BS.AddBattleMember(player); }
private static void LoadEnemy(String line, BattleScreen BS) { char[] delims = { '<', '>' }; String[] tokens = line.Substring(7).Split(delims); String texture = tokens[1]; int str = Int32.Parse(tokens[3]); int def = Int32.Parse(tokens[5]); int maxHP = Int32.Parse(tokens[7]); BattleScreenEnemy enemy = new BattleScreenEnemy(texture, BS); enemy.Strength = str; enemy.Defense = def; enemy.MaxHP = maxHP; BS.AddBattleMember(enemy); }
private static void LoadLaptop(String line, BattleScreen BS) { char[] delims = { '<', '>' }; String[] tokens = line.Substring(8).Split(delims); String texture = tokens[1]; int str = Int32.Parse(tokens[3]); int def = Int32.Parse(tokens[5]); int maxHP = Int32.Parse(tokens[7]); BattleScreenAIPartyMember laptop = new BattleScreenAIPartyMember(texture, BS); laptop.Strength = str; laptop.Defense = def; laptop.MaxHP = maxHP; BS.AddBattleMember(laptop); }
private static void LoadPlayer(String line, BattleScreen BS) { char[] delims = { '<', '>' }; String[] tokens = line.Substring(8).Split(delims); String texture = tokens[1]; int str = Int32.Parse(tokens[3]); int def = Int32.Parse(tokens[5]); int maxHP = Int32.Parse(tokens[7]); BattleScreenPlayer player = new BattleScreenPlayer(texture, BS); player.Strength = str; player.Defense = def; player.MaxHP = maxHP; BS.AddBattleMember(player); }