Exemple #1
0
    static int Clear(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        Blockable obj = (Blockable)LuaScriptMgr.GetNetObjectSelf(L, 1, "Blockable");

        obj.Clear();
        return(0);
    }
Exemple #2
0
    static int Update(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        Blockable obj = (Blockable)LuaScriptMgr.GetNetObjectSelf(L, 1, "Blockable");

        IM.Number arg0 = (IM.Number)LuaScriptMgr.GetNetObject(L, 2, typeof(IM.Number));
        obj.Update(arg0);
        return(0);
    }
Exemple #3
0
    static int Init(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 4);
        Blockable obj = (Blockable)LuaScriptMgr.GetNetObjectSelf(L, 1, "Blockable");

        PlayerAnimAttribute.AnimAttr arg0 = (PlayerAnimAttribute.AnimAttr)LuaScriptMgr.GetNetObject(L, 2, typeof(PlayerAnimAttribute.AnimAttr));
        IM.Number arg1 = (IM.Number)LuaScriptMgr.GetNetObject(L, 3, typeof(IM.Number));
        int       arg2 = (int)LuaScriptMgr.GetNumber(L, 4);

        obj.Init(arg0, arg1, arg2);
        return(0);
    }
Exemple #4
0
    static int _CreateBlockable(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 1)
        {
            Player    arg0 = (Player)LuaScriptMgr.GetNetObject(L, 1, typeof(Player));
            Blockable obj  = new Blockable(arg0);
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: Blockable.New");
        }

        return(0);
    }
Exemple #5
0
    static int get_tooEarly(IntPtr L)
    {
        object    o   = LuaScriptMgr.GetLuaObject(L, 1);
        Blockable obj = (Blockable)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name tooEarly");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index tooEarly on a nil value");
            }
        }

        LuaScriptMgr.Push(L, obj.tooEarly);
        return(1);
    }