using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class IconCreaterCtrl : IconBase { public string CreaterEventName; public Button thisButton; public CreaterType createrType = CreaterType.car; // Start is called before the first frame update void Start() { thisButton.onClick.AddListener(ButtonClick); } public virtual void ButtonClick() { EventCenter.Instance.EventTrigger(CreaterEventName, this); } }