Ejemplo n.º 1
0
        private VirtualInput CreateJoystick1VC()
        {
            var controller = new VirtualInput();

            controller.SetAxisNames("Horizontal", "Vertical");

            // No DPAD

            //controller.SetBinding(VirtualControllerCommand.Jump, KeyCode.Joystick1Button0);
            //controller.SetBinding(VirtualControllerCommand.Dash, KeyCode.Joystick1Button4);
            //controller.SetBinding(VirtualControllerCommand.Sprint, KeyCode.Joystick1Button5);

            controller.SetBinding(VirtualInputCommand.Attack, KeyCode.Joystick1Button2);
            controller.SetBinding(VirtualInputCommand.Cancel, KeyCode.Joystick1Button3);

            return(controller);
        }
Ejemplo n.º 2
0
        private VirtualInput CreateKeyboardVC()
        {
            var controller = new VirtualInput();

            controller.SetAxisNames("Horizontal", "Vertical");

            controller.SetBinding(VirtualInputCommand.Up, KeyCode.UpArrow);
            controller.SetBinding(VirtualInputCommand.Down, KeyCode.DownArrow);
            controller.SetBinding(VirtualInputCommand.Left, KeyCode.LeftArrow);
            controller.SetBinding(VirtualInputCommand.Right, KeyCode.RightArrow);

            controller.SetBinding(VirtualInputCommand.Attack, KeyCode.Z);
            controller.SetBinding(VirtualInputCommand.Cancel, KeyCode.Q);
            return(controller);
        }