示例#1
0
        private void HandlePlaySessionState(PlaySessionState playSessionState)
        {
            int score = 0;

            if (playSessionState != null && playSessionState.scoreData != null)
            {
                score = (int)playSessionState.scoreData.GetScore();
            }

            if (journeyPosition.IsAssessment())
            {
                //Debug.Log( playSessionState.psData.Id + " SCORE: " + score);
                // Show surprise if this is a not yet completed assessment
                surpriseGO.SetActive(score == 0);
            }
            else
            {
                surpriseGO.SetActive(false);

                for (int i = 0; i < stars.Length; i++)
                {
                    stars[i].SetObtained(score >= i + 1);
                }
            }
        }
示例#2
0
        public void Initialise(JourneyPosition _journeyPosition, PlaySessionState _playSessionState)
        {
            journeyPosition  = _journeyPosition;
            playSessionState = _playSessionState;

            HandleJourneyPosition(journeyPosition);
            HandlePlaySessionState(playSessionState);

            // @note: we do not show the JourneyPos text now
            journeyPosTextUI.gameObject.SetActive(false);

            if (journeyPosition.IsAssessment())
            {
                starsPivotGO.SetActive(false);
            }
        }
示例#3
0
 public void SetPlaySessionState(PlaySessionState playSessionState)
 {
     playSessionFeedback.Initialise(journeyPosition, playSessionState);
 }