updateNode() public method

public updateNode ( ) : void
return void
Exemplo n.º 1
0
        /// <summary>
        /// Overridden function from MonoBehavior
        /// </summary>
        internal void Update()
        {
            if (!FlightDriver.Pause && canShowNodeEditor)
            {
                PatchedConicSolver solver = NodeTools.getSolver();
                if (solver.maneuverNodes.Count > 0)
                {
                    if (!curState.hasNode() || !solver.maneuverNodes.Contains(curState.node))
                    {
                        // get the first one if we can't find the current or it's null
                        curState = new NodeManager(solver.maneuverNodes[0]);
                    }
                    else if (curState.hasNode())
                    {
                        curState.updateNode();
                        curState = curState.nextState();
                    }
                }
                else
                {
                    if (curState.hasNode())
                    {
                        curState = new NodeManager();
                        curState.resizeClockWindow = true;
                    }
                }
                processKeyInput();
            }

            intuitiveNodeGizmosManager.OnUpdate();
        }