Ejemplo n.º 1
0
            }   // end of ToolMenuUpdateObj c'tor

            /// <summary>
            /// ToolMenuUpdateObj Update()
            /// </summary>
            /// <param name="camera"></param>
            public override void Update()
            {
                base.Update();

                // No need to check for input focus or anything.  If
                // we're active then the ToolMenu object has focus.

                shared.ToolMenu.Update();

                // If the ToolMenu is no longer active we're done.
                if (!shared.ToolMenu.Active)
                {
                    return;
                }

                // Do the common bits of the Update().  If our child is active we
                // can temporarily push/pop our commandMap to grab input focus.
                if (shared.ToolMenu.Active)
                {
                    CommandStack.Push(commandMap);
                }
                UpdateCamera(false);
                if (shared.ToolMenu.Active)
                {
                    CommandStack.Pop(commandMap);
                }
                UpdateWorld();
                // TODO (****) Should this only be called for tools that use the edit brush?
                // TODO (****) How do we turn off the edit brush rendering if we don't need it?
                UpdateEditBrush();

                GamePadInput pad = GamePadInput.GetGamePad0();

                // Run!
                if (pad.Back.WasPressed)
                {
                    // TODO (****) Transition to RunSim.
                    // Or is this already done in the base class???
                }

                // MiniHub!
                if (pad.Start.WasPressed)
                {
                    // TODO (****) Transition to MinHub.
                    // Or is this already done in the base class???
                }

                ToolTipManager.Update();
                ThoughtBalloonManager.Update(shared.camera);
            }   // end of ToolMenuUpdateObj Update()