/// <summary> /// Called after a player is landed on WinAPillarOrGoTschool and answer correctly /// </summary> /// <param name="player">Player.</param> private void ProcessAfterPlayerMovedToWinAPillarOrGoToSchool(PlayerController player) { currentPlayerGotPillar = player; GameData.PillarType pillar; if (player.GetFreePillar(out pillar)) { UINavigationController.PushController("/WinPillar", (c) => { WinPillarController pillarController = (WinPillarController)c; if (pillarController) { pillarController.PillarWon(pillar); pillarController.target = this.gameObject; pillarController.func = "AddFreePillar"; } }, null); } }
/// <summary> /// Called after a player is succesfully landed on the target block and the player is correctly answers /// </summary> /// <param name="player">Player.</param> private void ProcessAfterPlayerMoved(PlayerController player) { if (activeNode != null) { currentPlayerGotPillar = player; Debug.Log("Player has moved to " + activeNode); if (activeNode.isPillar) { var pillar = GameData.GetColorTypeFromNodeType(activeNode.nodeType); UINavigationController.PushController("/WinPillar", (c) => { WinPillarController pillarController = (WinPillarController)c; if (pillarController) { pillarController.PillarWon(pillar); pillarController.target = this.gameObject; pillarController.func = "AddPillar"; } }, null); } else { switch (activeNode.nodeType) { case NodeType.Root: ShowHud(false); UINavigationController.PushBackground("/MainBackground"); UINavigationController.PushController("/GameOver"); break; default: GameClientPlugin.EndTurn(null); break; } } } }