public override void OnEnter() { var isPrevStateSwap = gameStateModel.State == Match3State.SwapInProgress; base.OnEnter(); Debug.Log("Check matches -> " + gameStateModel.State); var matches = boardModel.FindMatches(); //Found matches if (matches.Count > 0) { DestroyMatches(matches); if (isPrevStateSwap) { playerScoreModel.Turns--; } coroutineProvider.StartCoroutine(WaitForDestruction()); return; } //No matches found if (isPrevStateSwap) { //Start revert swap signalBus.Fire(new Match3Signals.StartSwapSignal(boardModel.FirstEntitySwapPosition, boardModel.SecondEntitySwapPosition, true)); } else { signalBus.Fire(new Match3Signals.StateChartSignal(BoardStateEvents.NoMatchesFoundEvent)); } }
private void RequestAuthorization() { Log.Debug("Checking internet..."); InternetReachabilityController.Check(reachable => { Log.Debug(log => { log.Debug(reachable ? "Internet is reachable" : "Internet not reachable"); log.Debug("Requesting authorization..."); }); CoroutineProvider.StartCoroutine(RequestAuthorizationCoroutine(AuthorizationOptions, reachable), out _coroutine); }); }
public void OnEnter() { coroutineProvider.StartCoroutine(OnEnterCoroutine()); }
public void LoadAsset(string assetId) { //CoroutineProvider.Instance.StartCoroutine(LoadAssetAsync(assetId)); _coroutineProvider.StartCoroutine(LoadAssetAsync(assetId)); }
public void Dispose() { coroutineProvider.StartCoroutine(DisposeWorld()); }
public void Initialize() { _coroutineProvider.StartCoroutine(StartGame()); _gameModel.Activate(); }
public void StartGame() { _coroutineProvider.StartCoroutine(_gameStateMachine.GoToState("CoreGame")); }
private void TriggerStateSwitch(GameSignals.GotoStateSignal gotoStateSignal) { var targetState = _gameStateFactory.Create(gotoStateSignal.TargetType); _coroutineProvider.StartCoroutine(GotoState(targetState)); }