public AsyncState RunGame(MemoryGameModel gameModel) { // game login entry point return(Planner.Chain() .AddAwait(AwaitFunc) ); }
private void Awake() { _memoryGameController = GetComponentInParent <MemoryGameController>(); _difficultyController = _memoryGameController.DifficultyController; _gameModelSO = Data.Instance.MemoryGameModel; _cardData = _gameModelSO.GetCardData(); }
public AsyncState RunGame(MemoryGameModel gameModel) { this.gameModel = gameModel; // game login entry point return(Planner.Chain() .AddAction(SetCarts) .AddAwait(AwaitAllCardsSet) .AddAction(StartFindAllPairs) .AddAwait(AwaitFindAllPairs) .AddAwait(AwaitGameComplite) ); }
public AsyncState RunGame(MemoryGameModel gameModel) { // game login entry point return(Planner.Chain() .AddAction(CardDealerController.SetImages, gameModel.images) .AddAction(CardDealerController.SetDifficultyController, DifficultyController) .AddFunc(CardDealerController.CardDealing, gameModel.numberOfCardPairs) .AddFunc(_tutorialHand.StartTutorial) .AddAction(() => { if (gameModel.HelpCount != 0) { _helpButton.gameObject.SetActive(true); CardDealerController.MaxHelpCount = gameModel.HelpCount; CardDealerController.HelpButton = _helpButton; } }) .AddAwait(AwaitFunc) ); }
public AsyncState RunGame(MemoryGameModel gameModel) { // game login entry point return(Planner.Chain() .AddAction(memoryCardDeal.SetImages, gameModel.images) .AddAction(memoryCardDeal.SetDifficultyController, gameModel.GetController()) .AddAction(memoryCardDeal.SetAudioManager, audioManager) .AddFunc(memoryCardDeal.CardDealing, gameModel.numberOfCardPairs) .AddFunc(tutorialHand.StartTutorial) .AddAction(() => { if (gameModel.helpCount != 0) { helpButton.gameObject.SetActive(true); helpButton.onClick.AddListener(() => audioManager.Play("HelpEffect")); memoryCardDeal.MaxHelpCount = gameModel.helpCount; memoryCardDeal.HelpButton = helpButton; } }) .AddAwait(AwaitFunc) ); }