ScoreboardUI class.
상속: MonoBehaviour
예제 #1
0
        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();
                }
            }
        }
예제 #2
0
 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);
 }
예제 #3
0
    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;
    }
예제 #4
0
 // 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;
 }