Ejemplo n.º 1
0
 void EasyTouch_On_DragEnd(Gesture gesture)
 {
     if (model != null)
     {
         model.canRotate = false;
         model           = null;
     }
 }
Ejemplo n.º 2
0
        void EasyTouch_On_SimpleTap(Gesture gesture)
        {
            GameObject go = SelectModel(gesture.position);

            if (go == null)
            {
                return;
            }
            model = go.GetComponent <ModelBehaviour>();
            model.ClickBehavior();
        }
Ejemplo n.º 3
0
 void EasyTouch_On_DragStart(Gesture gesture)
 {
     if (canRotate)
     {
         GameObject go = SelectModel(gesture.position);
         if (go == null)
         {
             return;
         }
         model           = go.GetComponent <ModelBehaviour>();
         model.canRotate = true;
     }
 }
Ejemplo n.º 4
0
 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));
     }
 }
Ejemplo n.º 5
0
 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));
     }
 }
Ejemplo n.º 6
0
    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));
        }
    }
Ejemplo n.º 7
0
    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));
        }
    }
Ejemplo n.º 8
0
    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));
        }
    }
Ejemplo n.º 9
0
    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));
        }
    }
Ejemplo n.º 10
0
    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));
        }
    }
Ejemplo n.º 11
0
    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));
        }
    }