forked from cgvr/DeltaVR
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			531 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			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";
 | 
						|
    }
 | 
						|
}
 |