Example #1
0
        private void CreateMonster(int id, Heroes.Core.ArmyIdEnum armyId, int row, int col)
        {
            Heroes.Core.Map.Monsters.Monster monster = null;

            switch (armyId)
            {
                case ArmyIdEnum.Pikeman:
                    monster = new Heroes.Core.Map.Monsters.Pikeman();
                    break;
            }

            monster._id = id;
            monster._cell = _cells[row, col];
            monster._cell._monster = monster;

            {
                Armies.Pikeman c = new Heroes.Core.Map.Armies.Pikeman();
                c._qty = 10;
                c._slotNo = 3;
                monster._armyKSlots.Add(c._slotNo, c);
            }

            _monsters.Add(id, monster);
        }
Example #2
0
        private void CreateHero(int heroId, Player player, int cellsRow, int cellsCol)
        {
            Hero hero = new Heroes.Core.Map.Heros.Knight();
            hero._id = heroId;
            hero._playerId = player._id;
            hero._player = player;
            hero._image = player._heroImage;
            player._heroes.Add(hero);

            // spells
            Heroes.Core.Spell spell = new Heroes.Core.Spell();
            hero._spells.Add(spell._id, spell);

            hero._cell = _cells[cellsRow, cellsCol];
            hero._cell._hero = hero;

            {
                Armies.Pikeman c = new Heroes.Core.Map.Armies.Pikeman();
                c._heroId = hero._id;
                c._playerId = hero._playerId;
                c.AddAttribute(hero);
                c._qty = 20;
                c._slotNo = 0;
                hero._armyKSlots.Add(c._slotNo, c);
            }

            //{
            //    Armies.Pikeman c = new Heroes.Core.Map.Armies.Pikeman();
            //    c._heroId = hero._id;
            //    c._playerId = hero._playerId;
            //    c.AddAttribute(hero);
            //    c._qty = 10;
            //    c._slotNo = 1;
            //    hero._armyKSlots.Add(c._slotNo, c);
            //}

            //{
            //    Armies.Archer c = new Heroes.Core.Map.Armies.Archer();
            //    c._heroId = hero._id;
            //    c._playerId = hero._playerId;
            //    c.AddAttribute(hero);
            //    c._qty = 10;
            //    c._slotNo = 2;
            //    hero._armyKSlots.Add(c._slotNo, c);
            //}

            //{
            //    Armies.Griffin c = new Heroes.Core.Map.Armies.Griffin();
            //    c._heroId = hero._id;
            //    c._playerId = hero._playerId;
            //    c.AddAttribute(hero);
            //    c._qty = 10;
            //    c._slotNo = 3;
            //    hero._armyKSlots.Add(c._slotNo, c);
            //}
        }