2023-05-08 15:56:10 +03:00

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