Exemplo n.º 1
0
        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            int idxButton = FindIndexOfPushButton(e);

            if (idxButton < 4)
            {
                game.Move((Direction)idxButton, random);
                UpdateAttackRange((Direction)idxButton, false);
            }
            else
            {
                game.Attack((Direction)(idxButton - 4), random);
            }

            buttonCtrl[idxButton].ForeColor = Color.White;
            buttonCtrl[idxButton].BackColor = Color.Crimson;

            UpdateCharacters();
        }
Exemplo n.º 2
0
 private void OnButtonMoveUpClick(object sender, EventArgs e)
 {
     _game.Move(Direction.Up, _random);
     UpdateCharacters();
 }
Exemplo n.º 3
0
 private void MoveLeftButton_Click(object sender, EventArgs e)
 {
     game.Move(Direction.Left, random);
     UpdateCharacters();
 }
Exemplo n.º 4
0
 private void up_Click(object sender, EventArgs e)
 {
     game.Move(Direction.Up, random);
     UpdateCharacters();
 }
Exemplo n.º 5
0
 private void MoveLeft()
 {
     game.Move(Direction.Left, random);
     UpdateCharacters();
 }
Exemplo n.º 6
0
 private void button1_Click(object sender, EventArgs e)
 {
     game.Move(The_Quest.IDirection.Direction.Up, random);
     UpdateCharacters();
 }