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); }
public void UpdateUIScores() { CollectibleScore currentPlayingScoreSceneController = SceneController.Instance._collectibleScore; GamePrimaryCollectibleNumber.text = GetRecordedText(currentPlayingScoreSceneController, true); GameSecondaryCollectibleNumber.text = GetRecordedText(currentPlayingScoreSceneController, false); }
public void UpdateMenuScores() { CollectibleScore currentSelectedScore = CollectibleScores[_currentLevelSelected]; StagePrimaryCollectibleNumber.text = GetCollectedText(currentSelectedScore, true); StageSecondaryCollectibleNumber.text = GetCollectedText(currentSelectedScore, false); }
public void RegisterCollectibleScore(CollectibleScore cs) { _collectibleScore = cs; _collectibleScore.ResetScore(); if (Menu.Instance != null) { Menu.Instance.UpdateUIScores(); } }
public void RegisterCollectibleScore(CollectibleScore cs) { _collectibleScore = cs; }