Example #1
0
    protected void LocalSinglePlayerGame(GameData.DataSlot dataSlot)
    {
        SinglePlayerGameClient plugin = gameObject.GetComponent <SinglePlayerGameClient>();

        if (plugin == null)
        {
            plugin = gameObject.AddComponent <SinglePlayerGameClient>();
        }
        SetGameClientPlugin(plugin);

        GameClientPlugin.Connect();
    }
Example #2
0
    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();
    }
Example #3
0
    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);
    }
Example #4
0
    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);
        }
    }
Example #5
0
 public void Initialize(IGameListener listener, GameData.DataSlot dataSlot)
 {
     gameListener  = listener;
     this.dataSlot = dataSlot;
 }
 public void Initialize(IGameListener listener, GameData.DataSlot dataSlot)
 {
     gameListener = listener;
     this.dataSlot = dataSlot;
 }