private void ProcessResults(GameResult result) { ShowWinnerText(result); int redI = 0; int blueI = 0; foreach (GameResult.PlayerResult player in result.PlayerResults) { ScoreboardUI ui = null; switch (player.Team) { case IAIBase.ETeam.TEAM_RED: ui = redScoreboard[redI]; ++redI; break; case IAIBase.ETeam.TEAM_BLUE: ui = blueScoreboard[blueI]; ++blueI; break; } if (ui != null) { ui.Name = player.PlayerName; ui.Kills = player.Kills.ToString(); ui.Deaths = player.Deaths.ToString(); ui.Flags = player.Flags.ToString(); ui.EXP = player.EXP.ToString(); } } }
void Start() { if (!isServer) { return; } aiPrefab = Resources.Load <GameObject>("AIPlayer"); UpdatePlayers(); deck = new Deck(); dealer = 0; table = GameObject.FindGameObjectWithTag("Table").GetComponent <Table>(); scoreboard = GameObject.FindGameObjectWithTag("Scoreboard").GetComponent <ScoreboardUI>(); Invoke("PlaceHolderStart", 3); }
void Start() { if (!isLocalPlayer) { return; } scoreboard = GameObject.FindGameObjectWithTag("Scoreboard").GetComponent <ScoreboardUI>(); transform.rotation = Quaternion.Euler(0, 0, 0); cam.gameObject.GetComponent <Camera>().enabled = true; transform.LookAt(GameObject.FindGameObjectWithTag("Table").GetComponent <Table>().Deck); characterTarget = transform.rotation; camTarget = cam.transform.localRotation; }
// Start is called before the first frame update void Start() { Scoreboard = this; _player1 = this.GetComponent <RectTransform>().Find("player1").gameObject; _player2 = this.GetComponent <RectTransform>().Find("player2").gameObject; }