private void NextStateTransition() { SOState nextState = SetNextState(this.statesDictionary.GetState(StateNames.refill)); nextState.StateAction(); StopListeningToEvents(); }
private void NextStateTransition(StateNames aStateName, Vector2 cellCoordinates) { SOState nextState = SetNextState(this.statesDictionary.GetState(aStateName)); StopListeningToEvents(); nextState.StateAction(cellCoordinates); }
private void NextStateTransition(StateNames aStateName, Vector2 aCellCoordinate) { SOState nextState = SetNextState(this.statesDictionary.GetState(aStateName)); StopListening(); ClearAll(); nextState.StateAction(aCellCoordinate, false); }
private void NextStateTransition(StateNames aStateName) { SOState nextState = SetNextState(this.statesDictionary.GetState(aStateName)); StopListening(); ClearAll(); nextState.StateAction(); }
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); } } }
///Used as debug to enable switching tokens public void SetState(SOState aState) { this.currentState = aState; }
///Set the state passed as arg as the current state and returns it public SOState SetCurrentState(SOState aState) { this.currentState = aState; return(this.currentState); }
public virtual SOState SetNextState(SOState aState) { return(this.theGameMaster.SetCurrentState(aState)); }
private void NextStateTransition(ArrowDirection aDirection, int aLineNumber) { SOState nextState = SetNextState(this.statesDictionary.GetState(StateNames.lateralMove)); nextState.StateAction(aDirection, aLineNumber); }
private void NextStateTransition(Vector2 coordinates) { SOState nextState = SetNextState(this.statesDictionary.GetState(StateNames.clickCell)); nextState.StateAction(coordinates); }
private void NextStateTransition(StateNames aStateName) { SOState nextState = SetNextState(this.statesDictionary.GetState(aStateName)); nextState.StateAction(); }