예제 #1
0
파일: Program.cs 프로젝트: riordanp/panjin
 //Removes the current game state and adds a new one
 public static void changeState(State state)
 {
     if(states.Count > 0)
     {
         states.RemoveAt(states.Count);
     }
     states.Add(state);
     states.Last().Init();
 }
예제 #2
0
파일: Program.cs 프로젝트: riordanp/panjin
        //Pauses the current state and adds a new one on top of it
        public static void addState(State state)
        {
            if (states.Count > 0)
            {
                states.Last().Pause();
            }

            states.Add(state);
            states.Last().Init();
        }
예제 #3
0
파일: Program.cs 프로젝트: riordanp/panjin
 //Removes the current state and resumes the next one in the list
 public static void removeState(State state)
 {
     if (states.Count > 0)
     {
         states.RemoveAt(states.Count);
     }
     if (states.Count > 0)
     {
         states.Last().Resume();
     }
 }