/// <summary> /// You can use this function for removing EventListener /// if you want to clear all of EventListener, let it be null. /// </summary> /// <param name="eventName"> "idle" | "press" | "drag" | "release" </param> /// <param name="callback"> (Vector3 pos) => { ... } or Nothing </param> static public void RemoveEventListener(string eventName, SEvent.Callback callback = null) { _instance._event.RemoveListener(eventName, callback); if (callback == null) { AddEventListener("eventName", _instance._updatordic["eventName"]); } }
//Interfaces /// <summary> /// You can use this function for adding EventListener /// </summary> /// <param name="eventName"> "idle" | "press" | "drag" | "release" </param> /// <param name="callback"> (Vector3 pos) => { ... } </param> static public void AddEventListener(string eventName, SEvent.Callback callback) { _instance._event.AddListener(eventName, callback); }