void onCompletedTeamInfoSent(OnlineTeam team) { if (team.MemberCount != GameData.CurrentTeam.MemberCount) { return; } if (team.TeamAlias == GameData.CurrentTeam.TeamAlias) { return; } if (doesTeamsListContainTeam(team.TeamAlias)) { return; } PackedScene scene = (PackedScene)ResourceLoader.Load("Scenes/AdvancedComponents/OnlineTeamInfoField.tscn"); OnlineTeamInfoField field = (OnlineTeamInfoField)scene.Instance(); field.Initialize(team, team.Players.Count, "Challenge"); if (disabledTeamsAliases.Contains(team.TeamAlias) || GameData.CurrentTeam.CaptainAlias != SessionData.User.Alias) { field.SetEnabled(false); } teamsList.AddChild(field); }
void onUncompletedTeamSent(OnlineTeam team) { PackedScene scene = (PackedScene)ResourceLoader.Load("Scenes/AdvancedComponents/OnlineTeamInfoField.tscn"); OnlineTeamInfoField field = (OnlineTeamInfoField)scene.Instance(); field.Initialize(team, team.Players.Count, "Join"); teamsList.AddChild(field); }
void addTeamToTeamsList(OnlineTeam team) { PackedScene scene = (PackedScene)ResourceLoader.Load("Scenes/AdvancedComponents/OnlineTeamInfoField.tscn"); OnlineTeamInfoField field = (OnlineTeamInfoField)scene.Instance(); field.Initialize(team, team.Players.Count, ""); field.SetButtonVisible(false); teamsList.AddChild(field); }