예제 #1
0
        public static void Process(States value, Controller controller)
        {
            if (controller.SharedState != null)
            {
                // If either state of the Autopilot switch is released
                if (Reactive.MultiSwitchStateOff(value, apahButton))
                {
                    controller.SharedState.ChangeMode(EliteSharedState.Mode.Travel);
                }

                if (Reactive.ButtonPressed(value, Button27))
                {
                    controller.SharedState.ChangeMode(EliteSharedState.Mode.Fighting);
                }

                if (Reactive.ButtonPressed(value, Button28))
                {
                    controller.SharedState.ChangeMode(EliteSharedState.Mode.Mining);
                }

                if (Reactive.ButtonPressed(value, Button01))
                {
                    controller.SharedState.ThrottleShift1 = true;
                }

                if (Reactive.ButtonReleased(value, Button01))
                {
                    controller.SharedState.ThrottleShift1 = false;
                }

                if (Reactive.ButtonReleased(value, Button15))
                {
                    controller.SharedState.ThrottleShift2 = true;
                }
            }
        }