예제 #1
0
        public void PopState()
        {
            OverworldState previousOverworldState = states.Pop();

            CurrentOverworldState.Resume(previousOverworldState);
            Logger.Log(CurrentOverworldState.GetType().Name + " overworld state resumed");
        }
 public void PushState(OverworldState state)
 {
     if (Overworld.CurrentOverworldState == this)
     {
         Overworld.PushState(state);
     }
 }
예제 #3
0
 public void PushState(OverworldState overworldState)
 {
     CurrentOverworldState.Pause();
     Logger.Log(CurrentOverworldState.GetType().Name + " overworld state paused");
     states.Push(overworldState);
     stateChanged = true;
 }
 public void ChangeState(OverworldState state)
 {
     if (Overworld.CurrentOverworldState == this)
     {
         Overworld.ChangeState(state);
     }
 }
 public virtual void Resume(OverworldState previousOverworldState)
 {
     if (OverworldStateRenderer != null)
     {
         OverworldStateRenderer.Resume();
     }
 }
예제 #6
0
 public OverworldStateRenderer(OverworldState overworldState)
 {
     if (overworldState == null)
     {
         throw new Exception("OverworldState cannot be null");
     }
     this.overworldState = overworldState;
 }
 public virtual void Resume(OverworldState previousOverworldState)
 {
     if (OverworldStateRenderer != null)
         OverworldStateRenderer.Resume();
 }
 public void PushState(OverworldState state)
 {
     if (Overworld.CurrentOverworldState == this)
         Overworld.PushState(state);
 }
 public void ChangeState(OverworldState state)
 {
     if (Overworld.CurrentOverworldState == this)
         Overworld.ChangeState(state);
 }
예제 #10
0
 public void ChangeState(OverworldState overworldState)
 {
     states.Pop();
     states.Push(overworldState);
     stateChanged = true;
 }
 public void ChangeState(OverworldState overworldState)
 {
     states.Pop();
     states.Push(overworldState);
     stateChanged = true;
 }
 public void PushState(OverworldState overworldState)
 {
     CurrentOverworldState.Pause();
     Logger.Log(CurrentOverworldState.GetType().Name + " overworld state paused");
     states.Push(overworldState);
     stateChanged = true;
 }
 public OverworldStateRenderer(OverworldState overworldState)
 {
     if (overworldState == null)
         throw new Exception("OverworldState cannot be null");
     this.overworldState = overworldState;
 }