using Axibug; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Game { public class AttackBox : MonoBehaviour { public E_NODE_TYPE selfNodeType; public int selfRoleId; public void InitNode(RoleBase role) { selfNodeType = role.RoleType; selfRoleId = role.RoleID; } public void OnTriggerEnter(Collider other) { //AxibugLog.Debug("OnTriggerEnter => tag" + other.tag); Debug.Log("OnTriggerEnter => tag " + other.tag); if (Common.CheckTagIsRole(other.tag, out E_NODE_TYPE Target_nodeType)) { RoleBase underatkrole = other.GetComponent(); AppEntry.Event.Fire(null, AttackHitEventArgs.Create(selfNodeType, selfRoleId, Target_nodeType, underatkrole.RoleID)); } } private void OnTriggerExit(Collider other) { Debug.Log("OnTriggerExit => tag " + other.tag); } } }