static int set_animationCallback(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UISpriteAnimation obj = (UISpriteAnimation)o; UISpriteAnimation.AnimationCallback arg0 = null; LuaTypes funcType2 = LuaDLL.lua_type(L, 2); if (funcType2 != LuaTypes.LUA_TFUNCTION) { arg0 = (UISpriteAnimation.AnimationCallback)ToLua.CheckObject(L, 2, typeof(UISpriteAnimation.AnimationCallback)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 2); arg0 = DelegateFactory.CreateDelegate(typeof(UISpriteAnimation.AnimationCallback), func) as UISpriteAnimation.AnimationCallback; } obj.animationCallback = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index animationCallback on a nil value" : e.Message)); } }
public static Delegate UISpriteAnimation_AnimationCallback(LuaFunction func) { if (func == null) { UISpriteAnimation.AnimationCallback fn = delegate { }; return(fn); } UISpriteAnimation.AnimationCallback d = (new UISpriteAnimation_AnimationCallback_Event(func)).Call; return(d); }
static int get_animationCallback(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UISpriteAnimation obj = (UISpriteAnimation)o; UISpriteAnimation.AnimationCallback ret = obj.animationCallback; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index animationCallback on a nil value" : e.Message)); } }