Пример #1
0
    void makeFramAnim(GameObject anim, LRenderElement elem)
    {
        LMovieClip comFram = anim.GetComponent <LMovieClip>();

        if (comFram != null)
        {
            comFram.path        = elem.path;
            comFram.fps         = elem.fs;
            comFram.frameLength = elem.frameCount;
            comFram.loadTexture();
            comFram.play();
        }
    }
Пример #2
0
 static int pause(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         LMovieClip obj = (LMovieClip)ToLua.CheckObject(L, 1, typeof(LMovieClip));
         obj.pause();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #3
0
    static int set_frameLength(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LMovieClip obj  = (LMovieClip)o;
            int        arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
            obj.frameLength = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index frameLength on a nil value" : e.Message));
        }
    }
Пример #4
0
    static int set_path(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LMovieClip obj  = (LMovieClip)o;
            string     arg0 = ToLua.CheckString(L, 2);
            obj.path = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index path on a nil value" : e.Message));
        }
    }
Пример #5
0
    static int set_isPlayOnwake(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LMovieClip obj  = (LMovieClip)o;
            bool       arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.isPlayOnwake = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index isPlayOnwake on a nil value" : e.Message));
        }
    }
Пример #6
0
    static int get_frameLength(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LMovieClip obj = (LMovieClip)o;
            int        ret = obj.frameLength;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index frameLength on a nil value" : e.Message));
        }
    }
Пример #7
0
    static int get_isPlayOnwake(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LMovieClip obj = (LMovieClip)o;
            bool       ret = obj.isPlayOnwake;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index isPlayOnwake on a nil value" : e.Message));
        }
    }
Пример #8
0
    static int get_fps(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LMovieClip obj = (LMovieClip)o;
            float      ret = obj.fps;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index fps on a nil value" : e.Message));
        }
    }