Пример #1
0
 public void pushLevel(int levNum)
 {
     prevState = cur;
     states[levNum].EnterLevel(curLevNum);
     levelStack[sp] = curLevNum;
     cur            = states[levNum];
     curLevNum      = levNum;
     sp++;
 }
Пример #2
0
        public int popLevel()
        {
            sp--;
            prevState = cur;
            cur       = states[levelStack[sp]];
            curLevNum = levelStack[sp];
            prevState.ExitLevel();

            RC_GameStateParent.prevKeyState       = Keyboard.GetState();
            RC_GameStateParent.keyState           = Keyboard.GetState(); // fix legacy keystate issues
            RC_GameStateParent.previousMouseState = Mouse.GetState();
            RC_GameStateParent.currentMouseState  = Mouse.GetState();
            return(curLevNum);
        }
Пример #3
0
        public void pushLevel(int levNum)
        {
            prevState = cur;
            states[levNum].EnterLevel(curLevNum);
            levelStack[sp] = curLevNum;
            cur            = states[levNum];
            curLevNum      = levNum;
            sp++;

            RC_GameStateParent.prevKeyState       = Keyboard.GetState();
            RC_GameStateParent.keyState           = Keyboard.GetState(); // fix legacy keystate issues
            RC_GameStateParent.previousMouseState = Mouse.GetState();
            RC_GameStateParent.currentMouseState  = Mouse.GetState();
        }
Пример #4
0
        public void setLevel(int levNum)
        {
            prevState = cur;

            states[levNum].EnterLevel(curLevNum);
            cur = states[levNum];
            prevStatePlayLevel = cur; // to call draw
            prevState.ExitLevel();
            curLevNum = levNum;

            RC_GameStateParent.prevKeyState       = Keyboard.GetState();
            RC_GameStateParent.keyState           = Keyboard.GetState(); // fix legacy keystate issues
            RC_GameStateParent.previousMouseState = Mouse.GetState();
            RC_GameStateParent.currentMouseState  = Mouse.GetState();
        }
Пример #5
0
 public void setEmptyLevel()
 {
     cur       = new EmptyState();
     curLevNum = -1; // hmm i guess empty level is now level -1
 }
Пример #6
0
 public void AddLevel(int levNum, RC_GameStateParent lev)
 {
     states[levNum] = lev;
 }