Пример #1
0
        private void addSoldierToTile(byte i_Row, byte i_Column)
        {
            Soldier soldier = r_GameHandler.GetSoldierAt(i_Row, i_Column);

            if (soldier != null)
            {
                ButtonSoldier buttonSoldier = new ButtonSoldier();

                buttonSoldier.Soldier = soldier;
                buttonSoldier.Click  += soldier_Click;
                m_FormGame.Controls.Add(buttonSoldier);

                buttonSoldier.Moved += buttonSoldiers_Moved;
                buttonSoldier.AnimateMoveToTile(m_Tiles[i_Row, i_Column]);
            }
        }
Пример #2
0
        private void soldier_Click(object i_Sender, EventArgs i_EventArgs)
        {
            ButtonSoldier soldierClicked = i_Sender as ButtonSoldier;

            tileClickHandler(soldierClicked.Tile);
        }
Пример #3
0
 private void buttonSoldiers_Moved(ButtonSoldier i_Button)
 {
     makeMoveByComputer();
 }