using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class AxeDestroy : MonoBehaviour
{
public GameObject Axe;
void OnMouseDown ()
{
if (GameObject.Find("Axe").GetComponent() == true)
{
Debug.Log ("Axe is ready");
Destroy (gameObject);
}
if (!GameObject.Find("Axe").GetComponent() == false)
{
Debug.Log ("Axe is unequipped");
}
}
↧