コード例 #1
0
    static int set_m_onCanDrag(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UI.SequenceHandleEx obj       = (UI.SequenceHandleEx)o;
            System.Func <bool>  arg0      = null;
            LuaTypes            funcType2 = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg0 = (System.Func <bool>)ToLua.CheckObject(L, 2, typeof(System.Func <bool>));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg0 = DelegateFactory.CreateDelegate(typeof(System.Func <bool>), func) as System.Func <bool>;
            }

            obj.m_onCanDrag = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_onCanDrag on a nil value" : e.Message));
        }
    }
コード例 #2
0
        public override void OnInspectorGUI()
        {
            m_comp = (SequenceHandleEx)this.target;
            if (m_comp.m_handle.CurType != Handle.Type.sequence)
            {
                m_comp.m_handle.SetType(Handle.Type.sequence);
                m_comp.m_handle.m_go = m_comp.gameObject;
            }

            EditorGUI.BeginChangeCheck();
            m_comp.m_loop      = EditorGUILayout.Toggle("是否循环", m_comp.m_loop);
            m_comp.m_dir       = EditorGUILayout.FloatField("滚动正向", m_comp.m_dir);
            m_comp.m_dirSize   = EditorGUILayout.FloatField("滚动大小", m_comp.m_dirSize);
            m_comp.m_endScroll = EditorGUILayout.Toggle("结束回滚", m_comp.m_endScroll);
            if (m_comp.m_endScroll)
            {
                m_comp.m_endScrollDuration = EditorGUILayout.FloatField("结束回滚时间", m_comp.m_endScrollDuration);
            }
            m_comp.m_clickToEnd = EditorGUILayout.Toggle("点击滚动", m_comp.m_clickToEnd);
            if (EditorGUI.EndChangeCheck())
            {
                EditorUtil.SetDirty(m_comp);
            }

            //显示打开动画序列编辑器按钮
            m_comp.m_handle.CurHandle.OnDraw(m_comp, m_comp.m_handle, OnOpenWnd);
        }
コード例 #3
0
 static int SetFactor(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UI.SequenceHandleEx obj = (UI.SequenceHandleEx)ToLua.CheckObject(L, 1, typeof(UI.SequenceHandleEx));
         float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
         obj.SetFactor(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #4
0
 static int OnEndDrag(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UI.SequenceHandleEx obj = (UI.SequenceHandleEx)ToLua.CheckObject(L, 1, typeof(UI.SequenceHandleEx));
         UnityEngine.EventSystems.PointerEventData arg0 = (UnityEngine.EventSystems.PointerEventData)ToLua.CheckObject(L, 2, typeof(UnityEngine.EventSystems.PointerEventData));
         obj.OnEndDrag(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #5
0
    static int set_m_clickToEnd(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UI.SequenceHandleEx obj = (UI.SequenceHandleEx)o;
            bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.m_clickToEnd = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_clickToEnd on a nil value" : e.Message));
        }
    }
コード例 #6
0
    static int set_m_endScrollDuration(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UI.SequenceHandleEx obj = (UI.SequenceHandleEx)o;
            float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.m_endScrollDuration = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_endScrollDuration on a nil value" : e.Message));
        }
    }
コード例 #7
0
    static int set_m_handle(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UI.SequenceHandleEx obj  = (UI.SequenceHandleEx)o;
            UI.Handle           arg0 = (UI.Handle)ToLua.CheckObject(L, 2, typeof(UI.Handle));
            obj.m_handle = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_handle on a nil value" : e.Message));
        }
    }
コード例 #8
0
    static int get_m_onCanDrag(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UI.SequenceHandleEx obj = (UI.SequenceHandleEx)o;
            System.Func <bool>  ret = obj.m_onCanDrag;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_onCanDrag on a nil value" : e.Message));
        }
    }
コード例 #9
0
    static int get_m_clickToEnd(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UI.SequenceHandleEx obj = (UI.SequenceHandleEx)o;
            bool ret = obj.m_clickToEnd;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_clickToEnd on a nil value" : e.Message));
        }
    }
コード例 #10
0
    static int get_m_endScrollDuration(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UI.SequenceHandleEx obj = (UI.SequenceHandleEx)o;
            float ret = obj.m_endScrollDuration;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_endScrollDuration on a nil value" : e.Message));
        }
    }
コード例 #11
0
    static int get_m_handle(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UI.SequenceHandleEx obj = (UI.SequenceHandleEx)o;
            UI.Handle           ret = obj.m_handle;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_handle on a nil value" : e.Message));
        }
    }
コード例 #12
0
 public void OnSceneGUI()
 {
     m_comp        = (SequenceHandleEx)this.target;
     Handles.color = Color.gray;
     Handles.ArrowCap(0, m_comp.transform.position, Quaternion.LookRotation(Quaternion.Euler(0, 0, m_comp.m_dir) * Vector3.right), m_comp.m_dirSize * m_comp.transform.lossyScale.x);
 }