public UIbehavour GetBehavour(string name) { GameObject tmpGame = GetGameObject(name); UIbehavour uIbehavour = tmpGame.GetComponent <UIbehavour>(); if (uIbehavour != null) { return(uIbehavour); } Debug.Log("未挂载UIbehavour"); return(null); }
public void AddbuttonListen(string name, UnityAction action) { UIbehavour uIbehavour = GetBehavour(name); if (uIbehavour != null) { uIbehavour.Addbutton(action); } else { Debug.Log("无uibehavour"); } }
public void AddDragListen(string name, UnityAction <BaseEventData> action) { UIbehavour uIbehavour = GetBehavour(name); if (uIbehavour != null) { uIbehavour.AddDragListen(action); } else { Debug.Log("未挂载UIbehavour组件"); } }