Esempio n. 1
0
    private void NextStateTransition()
    {
        SOState nextState = SetNextState(this.statesDictionary.GetState(StateNames.refill));

        nextState.StateAction();
        StopListeningToEvents();
    }
Esempio n. 2
0
    private void NextStateTransition(StateNames aStateName, Vector2 cellCoordinates)
    {
        SOState nextState = SetNextState(this.statesDictionary.GetState(aStateName));

        StopListeningToEvents();
        nextState.StateAction(cellCoordinates);
    }
Esempio n. 3
0
    private void NextStateTransition(StateNames aStateName, Vector2 aCellCoordinate)
    {
        SOState nextState = SetNextState(this.statesDictionary.GetState(aStateName));

        StopListening();
        ClearAll();
        nextState.StateAction(aCellCoordinate, false);
    }
Esempio n. 4
0
    private void NextStateTransition(StateNames aStateName)
    {
        SOState nextState = SetNextState(this.statesDictionary.GetState(aStateName));

        StopListening();
        ClearAll();
        nextState.StateAction();
    }
Esempio n. 5
0
 public void SetMainComponentsInAllStates(GameMaster aGameMaster,
                                          GridManager aGridManager   = null,
                                          MatchManager aMatchManager = null,
                                          TokenMovementManager aTokenMovementManager = null,
                                          Highlighter aHighlighter  = null,
                                          EffectsPool anEffectsPool = null
                                          )
 {
     foreach (StateNames state in Enum.GetValues(typeof(StateNames)))
     {
         if (this.statesDictionary.GetState(state) != null)
         {
             SOState aStateInDictionary = this.statesDictionary.GetState(state);
             aStateInDictionary.SetMainComponents(aGameMaster, aGridManager, aMatchManager, aTokenMovementManager, aHighlighter, anEffectsPool);
         }
     }
 }
Esempio n. 6
0
 ///Used as debug to enable switching tokens
 public void SetState(SOState aState)
 {
     this.currentState = aState;
 }
Esempio n. 7
0
 ///Set the state passed as arg as the current state and returns it
 public SOState SetCurrentState(SOState aState)
 {
     this.currentState = aState;
     return(this.currentState);
 }
Esempio n. 8
0
 public virtual SOState SetNextState(SOState aState)
 {
     return(this.theGameMaster.SetCurrentState(aState));
 }
Esempio n. 9
0
    private void NextStateTransition(ArrowDirection aDirection, int aLineNumber)
    {
        SOState nextState = SetNextState(this.statesDictionary.GetState(StateNames.lateralMove));

        nextState.StateAction(aDirection, aLineNumber);
    }
Esempio n. 10
0
    private void NextStateTransition(Vector2 coordinates)
    {
        SOState nextState = SetNextState(this.statesDictionary.GetState(StateNames.clickCell));

        nextState.StateAction(coordinates);
    }
Esempio n. 11
0
    private void NextStateTransition(StateNames aStateName)
    {
        SOState nextState = SetNextState(this.statesDictionary.GetState(aStateName));

        nextState.StateAction();
    }