Beispiel #1
0
        public override void SetInput(Button button, bool pressed)
        {
            char keyCode = ' ';

            switch (button)
            {
            case Button.Up:
                keyCode = 'u';
                break;

            case Button.Down:
                keyCode = 'd';
                break;

            case Button.Left:
                keyCode = 'l';
                break;

            case Button.Right:
                keyCode = 'r';
                break;

            case Button.A:
                keyCode = 'a';
                break;

            case Button.B:
                keyCode = 'b';
                break;

            case Button.Start:
                keyCode = 's';
                break;

            case Button.Select:
                keyCode = 'c';
                break;
            }
            if (x80 != null)
            {
                UnityEngine.Debug.Log(x80.emulator.game.title);
                x80.KeyChanged(keyCode, pressed);
            }
        }
Beispiel #2
0
        public override void SetInput(Button button, bool pressed)
        {
            char keyCode = ' ';

            switch (button)
            {
            case Button.Up:
                keyCode = 'u';
                break;

            case Button.Down:
                keyCode = 'd';
                break;

            case Button.Left:
                keyCode = 'l';
                break;

            case Button.Right:
                keyCode = 'r';
                break;

            case Button.A:
                keyCode = 'a';
                break;

            case Button.B:
                keyCode = 'b';
                break;

            case Button.Start:
                keyCode = 's';
                break;

            case Button.Select:
                keyCode = 'c';
                break;
            }

            x80.KeyChanged(keyCode, pressed);
        }
Beispiel #3
0
 private void GameForm_KeyDown(object sender, KeyEventArgs e)
 {
     x80.KeyChanged(e.KeyCode, true);
 }
Beispiel #4
0
 public void KeyDown(Button button)
 {
     _x80.KeyChanged(button, true);
 }