Exemple #1
0
 public void SetData(DeploymentData data)
 {
     DeploymentNameText.text = data.Name;
     PlayersText.text        = data.CurrentPlayers.ToString();
     MaxPlayersText.text     = data.MaxPlayers.ToString();
     AvailableSymbol.SetActive(data.IsAvailable);
     UnavailableSymbol.SetActive(!data.IsAvailable);
 }
        private void AddDeploymentToTable(DeploymentData deployment, int index)
        {
            var entry       = (DeploymentTableEntry)deploymentListTable.AddEntry();
            var entryButton = entry.GetComponent <Button>();

            entryButton.onClick.AddListener(() => SelectEntry(index));
            entry.SetData(deployment);
            SetDefaultVisuals(index);
        }
Exemple #3
0
        private bool PrepareDeploymentsList()
        {
            if (Blackboard.LoginTokens == null)
            {
                Owner.SetState(Owner.StartState);
            }

            var deploymentData = Blackboard.LoginTokens
                                 .Select(token => (DeploymentData.TryFromLoginToken(token, out var data), data))
                                 .Where(pair => pair.Item1)
                                 .Select(pair => pair.data)
                                 .ToList();

            ScreenManager.InformOfDeployments(deploymentData);
            return(deploymentData.Any(data => data.IsAvailable));
        }