public override void OnInspectorGUI()
    {
        GUILayout.Space(6f);
        BCEditorTools.SetLabelWidth(120f);

        BCTweenAlpha tw = target as BCTweenAlpha;

        GUI.changed = false;

        float from = EditorGUILayout.Slider("From", tw.from, 0f, 1f);
        float to   = EditorGUILayout.Slider("To", tw.to, 0f, 1f);

        tw.UGUIMode = EditorGUILayout.Toggle("UGUI Mode", tw.UGUIMode);
        if (GUI.changed)
        {
            BCEditorTools.RegisterUndo("Tween Change", tw);
            tw.from = from;
            tw.to   = to;
            BCEditorTools.SetDirty(tw);
        }
        if (tw.UGUIMode)
        {
            DrawDefaultInspector();
        }
        DrawCommonProperties();
    }
 static int SetCurrentValueToEnd(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         BCTweenAlpha obj = (BCTweenAlpha)ToLua.CheckObject <BCTweenAlpha>(L, 1);
         obj.SetCurrentValueToEnd();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 3
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public BCTweenAlpha Begin(GameObject go, float duration, float alpha)
    {
        BCTweenAlpha comp = BCUITweener.Begin <BCTweenAlpha>(go, duration);

        comp.from = comp.value;
        comp.to   = alpha;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }
    static int set_uguiModeRenders(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenAlpha           obj  = (BCTweenAlpha)o;
            UnityEngine.Renderer[] arg0 = ToLua.CheckObjectArray <UnityEngine.Renderer>(L, 2);
            obj.uguiModeRenders = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index uguiModeRenders on a nil value"));
        }
    }
    static int set_value(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenAlpha obj  = (BCTweenAlpha)o;
            float        arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.value = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index value on a nil value"));
        }
    }
    static int set_UGUIMode(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenAlpha obj  = (BCTweenAlpha)o;
            bool         arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.UGUIMode = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index UGUIMode on a nil value"));
        }
    }
 static int Begin(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
         float        arg1           = (float)LuaDLL.luaL_checknumber(L, 2);
         float        arg2           = (float)LuaDLL.luaL_checknumber(L, 3);
         BCTweenAlpha o = BCTweenAlpha.Begin(arg0, arg1, arg2);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int get_value(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenAlpha obj = (BCTweenAlpha)o;
            float        ret = obj.value;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index value on a nil value"));
        }
    }
    static int get_uguiModeRenders(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenAlpha           obj = (BCTweenAlpha)o;
            UnityEngine.Renderer[] ret = obj.uguiModeRenders;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index uguiModeRenders on a nil value"));
        }
    }
Esempio n. 10
0
    static int get_UGUIMode(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenAlpha obj = (BCTweenAlpha)o;
            bool         ret = obj.UGUIMode;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index UGUIMode on a nil value"));
        }
    }