public void RemoveEmptyRow(NodeAddedEvent e, UserRowNode userRow, [JoinByScoreTable] ScoreTableNode scoreTable) { if (scoreTable.scoreTableEmptyRowIndicators.emptyRows.Count > 0) { ScoreTableRowComponent row = scoreTable.scoreTableEmptyRowIndicators.emptyRows.Pop(); scoreTable.scoreTable.RemoveRow(row); } }
private void InitRow(ScoreTableRowComponent row, ScoreTableEmptyRowIndicatorsComponent scoreTableEmptyRowIndicators) { row.Color = scoreTableEmptyRowIndicators.emptyRowColor; row.Position = 0; foreach (ScoreTableRowIndicator indicator in scoreTableEmptyRowIndicators.indicators) { row.AddIndicator(indicator); } }
public void AddEmptyRow(NodeRemoveEvent e, UserRowNode userRow, [JoinByScoreTable] ScoreTableNode scoreTable) { if (scoreTable.scoreTable.gameObject.activeInHierarchy) { ScoreTableRowComponent t = scoreTable.scoreTable.AddRow(); scoreTable.scoreTableEmptyRowIndicators.emptyRows.Push(t); this.InitRow(t, scoreTable.scoreTableEmptyRowIndicators); } }
public void InitTeam(NodeAddedEvent e, [Combine] ScoreTableNode scoreTable, [Context, JoinByBattle] TeamBattleNode battle) { for (int i = 0; i < battle.userLimit.TeamLimit; i++) { ScoreTableRowComponent t = scoreTable.scoreTable.AddRow(); scoreTable.scoreTableEmptyRowIndicators.emptyRows.Push(t); this.InitRow(t, scoreTable.scoreTableEmptyRowIndicators); } base.ScheduleEvent <ScoreTableSetEmptyRowsPositionEvent>(scoreTable); }
public void AddUser(NodeAddedEvent e, [Combine] InitedScoreTable scoreTable, [Context, JoinByBattle, Combine] RoundUserNode roundUser) { ScoreTableRowComponent component = scoreTable.scoreTable.AddRow(); Entity entity = component.GetComponent <EntityBehaviour>().Entity; entity.AddComponent(new ScoreTableGroupComponent(scoreTable.scoreTableGroup.Key)); entity.AddComponent(new UserGroupComponent(roundUser.userGroup.Key)); foreach (ScoreTableRowIndicator indicator in component.indicators.Values) { EntityBehaviour behaviour = indicator.GetComponent <EntityBehaviour>(); if (behaviour != null) { behaviour.BuildEntity(entity); } } }
private void AddRow(InitedScoreTable scoreTable, RoundUserNode roundUser) { ScoreTableRowComponent component = scoreTable.scoreTable.AddRow(); Entity entity = component.GetComponent <EntityBehaviour>().Entity; entity.AddComponent(new ScoreTableGroupComponent(scoreTable.scoreTableGroup.Key)); entity.AddComponent(new UserGroupComponent(roundUser.userGroup.Key)); foreach (ScoreTableRowIndicator indicator in component.indicators.Values) { EntityBehaviour behaviour = indicator.GetComponent <EntityBehaviour>(); if (behaviour != null) { behaviour.BuildEntity(entity); } } }