non-vr lobby, version fix
This commit is contained in:
27
Assets/TreasureHunt.cs
Normal file
27
Assets/TreasureHunt.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
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";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user