public static void addExitEvent(this Transform trans, LuaFunction func) { if (func != null) { EventTriggerListener.get(trans).onExit = delegate { func.Call(); //func.Call(trans); }; } else { EventTriggerListener.get(trans).onExit = null; } }
public static void addDeltaDragEvent(this Transform trans, LuaFunction func) { if (func != null) { EventTriggerListener.get(trans).onDeltaDrag = delegate(float x, float y) { func.Call(x, y); //func.Call(trans); }; } else { EventTriggerListener.get(trans).onDrag = null; } }