Пример #1
0
    public string GetCollectedText(CollectibleScore collectibleScore, bool primary)
    {
        List <bool> scores;

        if (primary)
        {
            scores = collectibleScore.GetPrimaryCollectedInStage();
        }
        else
        {
            scores = collectibleScore.GetSecondaryCollectedInStage();
        }

        int collectedNum = 0;

        foreach (bool collected in scores)
        {
            if (collected)
            {
                collectedNum++;
            }
        }

        return(collectedNum + "/" + scores.Count);
    }
Пример #2
0
    public void UpdateUIScores()
    {
        CollectibleScore currentPlayingScoreSceneController = SceneController.Instance._collectibleScore;

        GamePrimaryCollectibleNumber.text   = GetRecordedText(currentPlayingScoreSceneController, true);
        GameSecondaryCollectibleNumber.text = GetRecordedText(currentPlayingScoreSceneController, false);
    }
Пример #3
0
    public void UpdateMenuScores()
    {
        CollectibleScore currentSelectedScore = CollectibleScores[_currentLevelSelected];

        StagePrimaryCollectibleNumber.text   = GetCollectedText(currentSelectedScore, true);
        StageSecondaryCollectibleNumber.text = GetCollectedText(currentSelectedScore, false);
    }
Пример #4
0
 public void RegisterCollectibleScore(CollectibleScore cs)
 {
     _collectibleScore = cs;
     _collectibleScore.ResetScore();
     if (Menu.Instance != null)
     {
         Menu.Instance.UpdateUIScores();
     }
 }
Пример #5
0
 public void RegisterCollectibleScore(CollectibleScore cs)
 {
     _collectibleScore = cs;
 }