Ejemplo n.º 1
0
 public Enemy CreateEnemy(EnemyData data)
 {
     Move weapon;
     weapon = new Move(LoadMoveData(TitleContainer.OpenStream(@"Content\DataFiles\Weapons\" + data.weapon + ".move")));
     List<Move> item = new List<Move>();
     for (int i = 0; i < data.items.Count; i++)
     {
         item.Add(new Move(LoadMoveData(TitleContainer.OpenStream(@"Content\DataFiles\Items\" + data.items[i] + ".move"))));
     }
     List<MagicMove> magic = new List<MagicMove>();
     for (int i = 0; i < data.magic.Count; i++)
     {
         magic.Add(new MagicMove(LoadMagicData(TitleContainer.OpenStream(@"Content\DataFiles\Spells\" + data.magic[i] + ".spell"))));
     }
     Enemy enemy = new Enemy(data, weapon, item, magic, GetSprites(data.name, data.type));
     return enemy;
 }
Ejemplo n.º 2
0
        private int turn; //1 for player, 2 for enemy

        #endregion Fields

        #region Constructors

        public BattleScreen(Player player, Enemy enemy)
        {
            this.player = player;
            this.enemy = enemy;
            turn = 1;
            battleOver = false;

            pStrBonus = 5;
            pIntBonus = 0;
            pDexBonus = 0;
            pStaBonus = 0;
            pDefBonus = 0;

            eStrBonus = 0;
            eIntBonus = 0;
            eDexBonus = 0;
            eStaBonus = 0;
            eDefBonus = 0;

            mainBox = TextureManager.GetInstance().UIMenu;
            sideBox = TextureManager.GetInstance().UIMenu2;
            background = TextureManager.GetInstance().BattleBackground;
            healthBar = TextureManager.GetInstance().HealthBar;
        }