DeltaVR/Assets/TreasureHunt.cs
2022-06-29 14:45:17 +03:00

28 lines
531 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class TreasureHunt : MonoBehaviour
{
public TMP_Text collectedText;
private int totalCollected;
private void Awake()
{
totalCollected = 0;
}
void Start()
{
collectedText.text = totalCollected.ToString() + "/8 objects collected";
}
public void addTotal()
{
totalCollected++;
collectedText.text = totalCollected.ToString() + "/8 objects collected";
}
}