예제 #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();
        }
예제 #2
0
 private void OnButtonMoveUpClick(object sender, EventArgs e)
 {
     _game.Move(Direction.Up, _random);
     UpdateCharacters();
 }
예제 #3
0
파일: Form1.cs 프로젝트: OrujOv/The-Quest-
 private void MoveLeftButton_Click(object sender, EventArgs e)
 {
     game.Move(Direction.Left, random);
     UpdateCharacters();
 }
예제 #4
0
파일: Form1.cs 프로젝트: claveeq/The-Quest
 private void up_Click(object sender, EventArgs e)
 {
     game.Move(Direction.Up, random);
     UpdateCharacters();
 }
예제 #5
0
 private void MoveLeft()
 {
     game.Move(Direction.Left, random);
     UpdateCharacters();
 }
예제 #6
0
 private void button1_Click(object sender, EventArgs e)
 {
     game.Move(The_Quest.IDirection.Direction.Up, random);
     UpdateCharacters();
 }