21 lines
567 B
C#
21 lines
567 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class MoonCounterTutorial : MonoBehaviour
|
|
{
|
|
public TMP_Text text;
|
|
public int requiredMoons=5;
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
text.text = $"{SpaceshipControllerSolo.player.MoonsCollected} / {requiredMoons} Moons Collected";
|
|
if(SpaceshipControllerSolo.player.MoonsCollected >= requiredMoons){
|
|
GetComponent<TutorialScreen>().OnNextButton();
|
|
gameObject.SetActive(false);
|
|
}
|
|
}
|
|
}
|