Пример #1
0
        private void updateScoreboardData(IBasketballMetadataModel basketballMetadataModel)
        {
            Debug.Log(Time.time + " UpdateScoreboardData");

            if (!isTeamDataSet)
            {
                setTeamData(basketballMetadataModel.HomeTeamID, basketballMetadataModel.AwayTeamID);
            }

            string awayTeamName = basketballMetadataModel.AwayTeamName;

            awayTeamScore    = basketballMetadataModel.AwayTeamScore;
            awayTeamNumFouls = basketballMetadataModel.AwayTeamFouls;

            string homeTeamName = basketballMetadataModel.HomeTeamName;

            homeTeamScore    = basketballMetadataModel.HomeTeamScore;
            homeTeamNumFouls = basketballMetadataModel.HomeTeamFouls;

            gamePeriod = basketballMetadataModel.Period;

            Debug.Log(
                awayTeamName + " " + awayTeamScore + " (fouls: " + awayTeamNumFouls + ") " +
                "vs. " +
                homeTeamName + " " + homeTeamScore + " (fouls: " + homeTeamNumFouls + ") " +
                "period " + gamePeriod
                );

            updateScoreboardUI();
        }
Пример #2
0
        // Called from DataService via IScoreboardView
        public void UpdateScoreboard(IMetadataModel model)
        {
            Debug.Log(Time.time + " GeminiScoreboard UpdateScoreboard");
            IBasketballMetadataModel basketballMetadataModel = (IBasketballMetadataModel)model;

            isMetadataSynced       = true;
            timeLastMetadataSynced = Time.time;
            updateScoreboardData(basketballMetadataModel);
        }