public void OnUserSelectChip() { if (ControllerFSM.CurrentState == StatesEnum.WaitUserInput) { ControllerFSM.SetState(StatesEnum.EnterUserInput); } }
private void Start() { Matcher = GetComponent <Matcher>(); Animator = GetComponent <TileAnimator>(); Board = GetComponent <Board>(); ControllerFSM = GetComponent <ControllerFSM>(); AnimationsTimeSettings = GetComponent <AnimationsTimeSettings>(); ControllerFSM.RegisterNewState(StatesEnum.Initialization, new StateFSM <InitializeBoardState>()); ControllerFSM.RegisterNewState(StatesEnum.WaitUserInput, new StateFSM <WaitUserInputState>()); ControllerFSM.RegisterNewState(StatesEnum.EnterUserInput, new StateFSM <CheckUserInputState>()); ControllerFSM.RegisterNewState(StatesEnum.FindMatches, new StateFSM <CheckMatchesState>()); ControllerFSM.RegisterNewState(StatesEnum.HaveNoOneTurn, new StateFSM <HaveNoOneTurnState>()); ControllerFSM.SetState(StatesEnum.Initialization); }