forked from cgvr/DeltaVR
		
	
		
			
				
	
	
		
			34 lines
		
	
	
		
			724 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			724 B
		
	
	
	
		
			C#
		
	
	
	
	
	
using System.Collections;
 | 
						|
using System.Collections.Generic;
 | 
						|
using UnityEngine;
 | 
						|
 | 
						|
public class TreasureObject : MonoBehaviour
 | 
						|
{
 | 
						|
    public TreasureHunt controller;
 | 
						|
    public CollectionTray tray;
 | 
						|
    public int row;
 | 
						|
    
 | 
						|
    private void Collected()
 | 
						|
    {
 | 
						|
        //controller.addTotal();
 | 
						|
        tray.RowShow(row);
 | 
						|
        GetComponent<Renderer>().enabled = false;
 | 
						|
        GetComponent<BoxCollider>().enabled = false;
 | 
						|
        //Destroy(gameObject);
 | 
						|
    }
 | 
						|
 | 
						|
    public void CollectedPun()
 | 
						|
    {
 | 
						|
        //photonView.RPC("Collected", RpcTarget.AllBuffered);
 | 
						|
    }
 | 
						|
 | 
						|
    private void OnTriggerEnter(Collider other)
 | 
						|
    {
 | 
						|
        if (other.transform.CompareTag("MenuHand"))
 | 
						|
        {
 | 
						|
            CollectedPun();
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
}
 |