Exemplo n.º 1
0
        // Called when the state has been changed away to the given state
        protected override void onChangedTo(ref GameState newState)
        {
            if(newState is GSBattleScene)
            {
                // Variables
                GSBattleScene	gsbs=	(GSBattleScene)newState;

                gsbs.info=	currBattleInfo;
            }
        }
Exemplo n.º 2
0
 // Called when the state has been changed away to the given state
 protected virtual void onChangedTo(ref GameState newState)
 {
 }
Exemplo n.º 3
0
 // Called when the state has been changed away from the given state
 protected virtual void onChangedFrom(ref GameState oldState)
 {
 }
Exemplo n.º 4
0
 // Internally called when the state has been changed away to the given state
 internal void i_changedTo(ref GameState newState)
 {
     onChangedTo(ref newState);
 }
Exemplo n.º 5
0
 // Internally called when the state has been changed away from the given state
 internal void i_changedFrom(ref GameState oldState)
 {
     onChangedFrom(ref oldState);
 }
Exemplo n.º 6
0
 // --- Methods ---
 // Adds the given state to the game
 public void addState(string name, GameState state)
 {
     if(!states.add(name, state))
         throw new Exception("Could not load in game state: "+name);
     state.i_init(game);
 }