コード例 #1
0
ファイル: ModelInputer.cs プロジェクト: mengtest/HjqstSource
 void EasyTouch_On_DragEnd(Gesture gesture)
 {
     if (model != null)
     {
         model.canRotate = false;
         model           = null;
     }
 }
コード例 #2
0
ファイル: ModelInputer.cs プロジェクト: mengtest/HjqstSource
        void EasyTouch_On_SimpleTap(Gesture gesture)
        {
            GameObject go = SelectModel(gesture.position);

            if (go == null)
            {
                return;
            }
            model = go.GetComponent <ModelBehaviour>();
            model.ClickBehavior();
        }
コード例 #3
0
ファイル: ModelInputer.cs プロジェクト: mengtest/HjqstSource
 void EasyTouch_On_DragStart(Gesture gesture)
 {
     if (canRotate)
     {
         GameObject go = SelectModel(gesture.position);
         if (go == null)
         {
             return;
         }
         model           = go.GetComponent <ModelBehaviour>();
         model.canRotate = true;
     }
 }
コード例 #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));
     }
 }
コード例 #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));
     }
 }
コード例 #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));
        }
    }
コード例 #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));
        }
    }
コード例 #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));
        }
    }
コード例 #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));
        }
    }
コード例 #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));
        }
    }
コード例 #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));
        }
    }