void EasyTouch_On_DragEnd(Gesture gesture) { if (model != null) { model.canRotate = false; model = null; } }
void EasyTouch_On_SimpleTap(Gesture gesture) { GameObject go = SelectModel(gesture.position); if (go == null) { return; } model = go.GetComponent <ModelBehaviour>(); model.ClickBehavior(); }
void EasyTouch_On_DragStart(Gesture gesture) { if (canRotate) { GameObject go = SelectModel(gesture.position); if (go == null) { return; } model = go.GetComponent <ModelBehaviour>(); model.canRotate = true; } }
static int ClickBehavior(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); Logic.Model.View.ModelBehaviour obj = (Logic.Model.View.ModelBehaviour)ToLua.CheckObject(L, 1, typeof(Logic.Model.View.ModelBehaviour)); obj.ClickBehavior(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int Rotate(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); Logic.Model.View.ModelBehaviour obj = (Logic.Model.View.ModelBehaviour)ToLua.CheckObject(L, 1, typeof(Logic.Model.View.ModelBehaviour)); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.Rotate(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_defaultSpeed(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); Logic.Model.View.ModelBehaviour obj = (Logic.Model.View.ModelBehaviour)o; float ret = obj.defaultSpeed; LuaDLL.lua_pushnumber(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index defaultSpeed on a nil value" : e.Message)); } }
static int set_canRotate(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); Logic.Model.View.ModelBehaviour obj = (Logic.Model.View.ModelBehaviour)o; bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.canRotate = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index canRotate on a nil value" : e.Message)); } }
static int set_stateNameHash(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); Logic.Model.View.ModelBehaviour obj = (Logic.Model.View.ModelBehaviour)o; int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.stateNameHash = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index stateNameHash on a nil value" : e.Message)); } }
static int set_defaultSpeed(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); Logic.Model.View.ModelBehaviour obj = (Logic.Model.View.ModelBehaviour)o; float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.defaultSpeed = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index defaultSpeed on a nil value" : e.Message)); } }
static int get_CharacterEntity(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); Logic.Model.View.ModelBehaviour obj = (Logic.Model.View.ModelBehaviour)o; Logic.Character.CharacterEntity ret = obj.CharacterEntity; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index CharacterEntity on a nil value" : e.Message)); } }
static int get_stateNameHash(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); Logic.Model.View.ModelBehaviour obj = (Logic.Model.View.ModelBehaviour)o; int ret = obj.stateNameHash; LuaDLL.lua_pushinteger(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index stateNameHash on a nil value" : e.Message)); } }