Example #1
0
    public virtual void UpdateDisplay(GamePlayerRuntimeData runtimeData, float timeTotal)
    {
        double totalScoreValue = runtimeData.totalScoreValue;

        UIUtil.SetLabelValue(totalTime, FormatUtil.GetFormattedTimeHoursMinutesSecondsMs((double)timeTotal));
        UIUtil.SetLabelValue(totalCoins, runtimeData.coins.ToString("N0"));
        UIUtil.SetLabelValue(totalScores, runtimeData.scores.ToString("N0"));
        UIUtil.SetLabelValue(totalScoreSmarts, runtimeData.score.ToString("N0"));
        UIUtil.SetLabelValue(totalScore, totalScoreValue.ToString("N0"));
        UIUtil.SetLabelValue(totalKills, runtimeData.kills.ToString("N0"));
    }
    public void BroadcastGameLevelFinishData(bool showReplayCallout)
    {
        Debug.Log("Broadcast: BroadcastGameLevelFinishData:Starting");

        if (BroadcastNetworks.broadcastNetworksEnabled)
        {
            if (GameProfiles.Current.GetBroadcastRecordLevels())
            {
                if (BroadcastNetworks.IsRecording())
                {
                    Debug.Log("BroadcastGameLevelFinishData" + " record levels:" +
                              GameProfiles.Current.GetBroadcastRecordLevels());

                    BroadcastNetworks.StopRecording();

                    if (showReplayCallout)
                    {
                        ShowBroadcastRecordPlayShare();
                    }

                    GamePlayerRuntimeData runtimeData          = new GamePlayerRuntimeData();
                    GamePlayerController  gamePlayerController = GameController.CurrentGamePlayerController;

                    if (gamePlayerController != null)
                    {
                        runtimeData = gamePlayerController.runtimeData;
                    }

                    string word = GameCommunitySocialController.Instance.GetGameAdjective();

                    BroadcastNetworks.SetMetadata("about",
                                                  word + Locos.Get(LocoKeys.social_everyplay_game_results_message));

                    BroadcastNetworks.SetMetadata("game", Locos.Get(LocoKeys.app_display_name));
                    BroadcastNetworks.SetMetadata("level", Locos.Get(LocoKeys.game_type_arcade));
                    BroadcastNetworks.SetMetadata("level_name", Locos.Get(LocoKeys.game_type_arcade_mode));
                    BroadcastNetworks.SetMetadata("url", Locos.Get(LocoKeys.app_web_url));
                    BroadcastNetworks.SetMetadata("score", runtimeData.score.ToString("N0"));
                    BroadcastNetworks.SetMetadata("scores", runtimeData.scores.ToString("N0"));
                    BroadcastNetworks.SetMetadata("coins", runtimeData.coins.ToString("N0"));
                    BroadcastNetworks.SetMetadata("total_score", runtimeData.totalScoreValue.ToString("N0"));

                    Debug.Log("BroadcastGameLevelFinishData" + " runtimeData.scores:" + runtimeData.scores);
                }
            }
        }
    }
Example #3
0
    public virtual void UpdateDisplay(GamePlayerRuntimeData runtimeData, float timeTotal)
    {
        ShowContentState();

        UIUtil.SetLabelValue(labelContentStateDisplayName, AppContentStates.Current.display_name);

        if (AppContentStates.Instance.isAppContentStateGameChallenge)
        {
#if ENABLE_FEATURE_MODE_CHALLENGE
            foreach (GameUIPanelResultsChallenge result in containerModes.GetComponentsInChildren <GameUIPanelResultsChallenge>(true))
            {
                result.UpdateDisplay(runtimeData, timeTotal);
            }
#endif
        }

#if ENABLE_FEATURE_MODE_TRAINING
        else if (AppContentStates.Instance.isAppContentStateGameTrainingChoiceQuiz)
        {
            //foreach(UIPanelResultsChoiceQuiz result in containerModes.GetComponentsInChildren<UIPanelResultsChoiceQuiz>(true)) {
            //    result.UpdateDisplay(runtimeData, timeTotal);
            //}
        }
        else if (AppContentStates.Instance.isAppContentStateGameTrainingCollectionSafety)
        {
            //foreach(UIPanelResultsCollectionSafety result in containerModes.GetComponentsInChildren<UIPanelResultsCollectionSafety>(true)) {
            //    result.UpdateDisplay(runtimeData, timeTotal);
            //}
        }
        else if (AppContentStates.Instance.isAppContentStateGameTrainingCollectionSmarts)
        {
            //foreach(UIPanelResultsCollectionSmarts result in containerModes.GetComponentsInChildren<UIPanelResultsCollectionSmarts>(true)) {
            //    result.UpdateDisplay(runtimeData, timeTotal);
            //}
        }
#endif

        else   // if(AppContentStates.Instance.isAppContentStateGameArcade) {
        {
            foreach (GameUIPanelResultsArcade result in containerModes.GetComponentsInChildren <GameUIPanelResultsArcade>(true))
            {
                result.UpdateDisplay(runtimeData, timeTotal);
            }
        }
    }
 public override void UpdateDisplay(GamePlayerRuntimeData runtimeData, float timeTotal)
 {
     base.UpdateDisplay(runtimeData, timeTotal);
 }