static int set_eventAction(IntPtr L) { try { Lesson7 obj = (Lesson7)ToLua.CheckObject(L, 1, typeof(Lesson7)); EventObject arg0 = null; if (LuaDLL.lua_isuserdata(L, 2) != 0) { arg0 = (EventObject)ToLua.ToObject(L, 2); } else { return(LuaDLL.luaL_throw(L, "The event 'Lesson7.eventAction' can only appear on the left hand side of += or -= when used outside of the type 'Lesson7'")); } if (arg0.op == EventOp.Add) { UnityEngine.Events.UnityAction ev = (UnityEngine.Events.UnityAction)arg0.func; obj.eventAction += ev; } else if (arg0.op == EventOp.Sub) { UnityEngine.Events.UnityAction ev = (UnityEngine.Events.UnityAction)arg0.func; obj.eventAction -= ev; } return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int ClearEvent(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); Lesson7 obj = (Lesson7)ToLua.CheckObject <Lesson7>(L, 1); obj.ClearEvent(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
}// end method my lesson 8 examples static void MyLesson7Examples() { Lesson7 mySeven = new Lesson7(); mySeven.BasicMath(); mySeven.BasicModulus(); mySeven.MyCheckOperator1(); mySeven.MyCheckOperator2(); mySeven.MyLeftShiftOperator(); mySeven.MyAndAssignmentOperator(); mySeven.MyOrAssignmentOperator(); mySeven.MyXOrAssignmentOperator(); mySeven.MyIncrementDecrementExample(); } // end method my lesson 7 examples
static void MyLesson7Examples() { Lesson7 mySeven = new Lesson7(); mySeven.BasicMath(); mySeven.BasicModuls(); mySeven.BasicCheckedOperator(46, 85); mySeven.BasicCheckedOperator2(); mySeven.BasicAssignmentExamples(); mySeven.MyLeftShiftOperator(); mySeven.MyRightShiftOperator(); mySeven.MyAndAssignmentOperator(10, 2); mySeven.MyOrAssignmentOperator(); mySeven.MyXORAssignement(); mySeven.MyIncrementDecrementExamples(); }
static int get_unityAction(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); Lesson7 obj = (Lesson7)o; UnityEngine.Events.UnityAction ret = obj.unityAction; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index unityAction on a nil value")); } }
static int set_unityAction(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); Lesson7 obj = (Lesson7)o; UnityEngine.Events.UnityAction arg0 = (UnityEngine.Events.UnityAction)ToLua.CheckDelegate <UnityEngine.Events.UnityAction>(L, 2); obj.unityAction = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index unityAction on a nil value")); } }
static int _CreateLesson7(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { Lesson7 obj = new Lesson7(); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: Lesson7.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }