using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; /// /// 铁锤嘴贱 /// public class Hammer_Mon : MonoBehaviour, IPointerClickHandler { public void OnPointerClick(PointerEventData eventData) { if (GameObject.FindGameObjectWithTag("铁匠玩家").GetComponent().GetForgingbarBoxCount() == 0) { Debug.LogError("锻造台上没材料"); return; } Debug.Log("武器开始锻造"); GameObject.FindGameObjectWithTag("铁匠玩家").GetComponent().HammerForging(); GameObject.FindGameObjectWithTag("铁匠玩家").GetComponent().RemoveForgingbar(); } void Start() { } // Update is called once per frame void Update() { } }