protected void LocalSinglePlayerGame(GameData.DataSlot dataSlot) { SinglePlayerGameClient plugin = gameObject.GetComponent <SinglePlayerGameClient>(); if (plugin == null) { plugin = gameObject.AddComponent <SinglePlayerGameClient>(); } SetGameClientPlugin(plugin); GameClientPlugin.Connect(); }
protected void OnlineMultiplayerGame(GameData.DataSlot dataSlot) { OnlineGameClient plugin = gameObject.GetComponent <OnlineGameClient>(); if (plugin == null) { plugin = gameObject.AddComponent <OnlineGameClient>(); } SetGameClientPlugin(plugin); UINavigationController.PushController(connectionViewController); GameClientPlugin.Connect(); }
public void Setup(GameData.DataSlot dataSlot) { foreach (PlayerIconController obj in playerIcons) { obj.gameObject.SetActive(false); } if (questionTypeHint != null) { questionTypeHint.SetActive(false); } if (pillarsHudController != null) { pillarsHudController.SetupPillars(dataSlot.pillarsNeeded); } SetupPlayersIcon(dataSlot); }
public void SetupPlayersIcon(GameData.DataSlot slot) { if (playerIcons == null) { return; } for (int i = 0; i < slot.players.Count; i++) { var currentPlayer = slot.players[i]; var playerObj = playerIcons[i]; playerObj.gameObject.SetActive(true); var playerSprite = GetPlayerAvatar(playerObj.gameObject); var playerLabel = GetPlayerLabel(playerObj.gameObject); var playerProfile = currentPlayer.GetPlayerProfile(); playerSprite.spriteName = GetCharacterNameByPillarName(playerProfile.Avatar); playerLabel.text = playerProfile.Name; playerObj.pillarsHudController.SetupPillars(currentPlayer.pillarsAcquired); } }
public void Initialize(IGameListener listener, GameData.DataSlot dataSlot) { gameListener = listener; this.dataSlot = dataSlot; }