UPF/Assets/Game/Scripts/Minigame/Solo/MoonCounterTutorial.cs
2023-02-24 22:14:55 +05:30

21 lines
567 B
C#
Executable File

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);
}
}
}