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 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);
 }
 public void DrawActionMenu(BattleScreenPlayer player, SpriteBatch spriteBatch)
 {
     actionMenuPos = new Vector2(actionMenu.GetInnerRectangle.X + 5, actionMenu.GetInnerRectangle.Y + 5);
     actionMenu.Draw();
     foreach (CombatAction action in player.CombatActions)
     {
         if (action.IsHighLighted)
         {
             spriteBatch.DrawString(font, action.ActionText, actionMenuPos, Color.Yellow, 0.0f, Vector2.Zero, 1.8f, SpriteEffects.None, 0.0f);
         }
         else
         {
             spriteBatch.DrawString(font, action.ActionText, actionMenuPos, Color.White, 0.0f, Vector2.Zero, 1.8f, SpriteEffects.None, 0.0f);
         }
         actionMenuPos.Y += font.LineSpacing * 2.0f;
     }
 }
Esempio n. 4
0
 public void AddBattleMember(BattleScreenMember member)
 {
     battleScreenMembers.Add(member);
     if (member is BattleScreenPlayer)
         player = (BattleScreenPlayer)member;
 }