示例#1
0
        public ScreenManager(ContentManager content)
        {
            mContent = content;
            mInputManager = new InputManager();
            mScreenStack = new Stack<IScreen>();
            mScreensToDraw = new Stack<IScreen>();
            mScreensToUpdate = new Stack<IScreen>();
            mScreensToAdd = new List<IScreen>();

            mMetronomeScreen = new MetronomeScreen(this, mContent);

            mScreenStack.Push(mMetronomeScreen);
        }
示例#2
0
 /// <summary>
 /// Initializes the buttons of the HUD.
 /// </summary>
 private void Initialize(MetronomeScreen.RunAction[] actions, string[] names, string[] labels=null)
 {
     mButtons = new Button[actions.Length];
     for (var i = 0; i < mButtons.Length; i++)
     {
         if (labels != null) mButtons[i].mLabel = labels[i];
         mButtons[i].mTexName = names[i];
         mButtons[i].mState = OwnButtonState.Normal;
         mButtons[i].mAction = actions[i];
         mButtons[i].mTextures = new Texture2D[3];
     }
 }