Exemple #1
0
    static int set_lifeCycle(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            CanYing obj  = (CanYing)o;
            float   arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.lifeCycle = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index lifeCycle on a nil value" : e.Message));
        }
    }
Exemple #2
0
    static int get_lifeCycle(IntPtr L)
    {
        object o = null;

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