Exemple #1
0
        public void UpdateTriggers()
        {
            if (localControl || (InContact && powered))
            {
                if (GameSettings.SAS_TOGGLE.GetKeyDown() || GameSettings.SAS_HOLD.GetKeyDown() || GameSettings.SAS_HOLD.GetKeyUp())
                {
                    flightComputerGUI.attitudeButtons[0].on = !flightComputerGUI.attitudeButtons[0].on;
                }


                TriggerState state = RTUtils.triggerstate;

                if (state.ActionGroup != KSPActionGroup.None)
                {
                    if (localControl)
                    {
                        applyTrigger(state.ActionGroup);
                    }
                    else
                    {
                        state.ActTime = Planetarium.GetUniversalTime() + path.ControlDelay;
                        states.Enqueue(state);
                    }
                }

                if (states.Count > 0 && states.Peek().ActTime <= Planetarium.GetUniversalTime())
                {
                    applyTrigger(states.Dequeue().ActionGroup);
                }
            }
        }
Exemple #2
0
        public void UpdateTriggers()
        {
            if (localControl || (InContact && powered))
            {
                TriggerState state = RTUtils.triggerstate;

                if (state.ActionGroup != KSPActionGroup.None)
                {
                    if (localControl)
                    {
                        applyTrigger(state.ActionGroup);
                    }
                    else
                    {
                        state.ActTime = Planetarium.GetUniversalTime() + path.ControlDelay;
                        states.Enqueue(state);
                    }
                }

                if (states.Count > 0 && states.Peek().ActTime <= Planetarium.GetUniversalTime())
                {
                    applyTrigger(states.Dequeue().ActionGroup);
                }
            }
        }