Esempio 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;
            }
        }
Esempio n. 2
0
 // Called when the state has been changed away to the given state
 protected virtual void onChangedTo(ref GameState newState)
 {
 }
Esempio n. 3
0
 // Called when the state has been changed away from the given state
 protected virtual void onChangedFrom(ref GameState oldState)
 {
 }
Esempio 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);
 }
Esempio 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);
 }
Esempio 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);
 }