CoolFace
Datasetpublic

jiuyhfdj/wdsm_cocos_lua_debug_shell

# WDSM Cocos-Lua Debug Shell 这是从 D:\UU\23707_wdsm_wdsm_3k_20260319_28719_m0.apk 逆向整理出的 Cocos2d-x Lua Win32 调试壳工程,用于继续恢复、修改和预览游戏 UI / 建筑功能。 给 Max 接手先读 D:\UU\wdsm_cocos_lua_debug_shell\MAX_START_HERE.md D:\UU\wdsm_cocos_lua_debug_shell\MAX_RUNBOOK.md D:\UU\wdsm_cocos_lua_debug_shell\MAX_TASK_STATE.md D:\UU\wdsm_cocos_lua_debug_shell\MAX_PROJECT_INDEX.md D:\UU\wdsm_cocos_lua_debug_shell\work\mission-state.md 快速启动… See the full description on the dataset page: https://huggingface.co/datasets/jiuyhfdj/wdsm_cocos_lua_debug_shell.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes28downloads
package_support.lua114 linesDownload Raw Back to framework
1--[[2 3Copyright (c) 2014-2017 Chukong Technologies Inc.4 5Permission is hereby granted, free of charge, to any person obtaining a copy6of this software and associated documentation files (the "Software"), to deal7in the Software without restriction, including without limitation the rights8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell9copies of the Software, and to permit persons to whom the Software is10furnished to do so, subject to the following conditions:11 12The above copyright notice and this permission notice shall be included in13all copies or substantial portions of the Software.14 15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN21THE SOFTWARE.22 23]]24 25-- Cocos2d-Lua core functions26cc.loaded_packages = {}27local loaded_packages = cc.loaded_packages28 29function cc.register(name, package)30    cc.loaded_packages[name] = package31end32 33function cc.load(...)34    local names = {...}35    assert(#names > 0, "cc.load() - invalid package names")36 37    local packages = {}38    for _, name in ipairs(names) do39        assert(type(name) == "string", string.format("cc.load() - invalid package name \"%s\"", tostring(name)))40        if not loaded_packages[name] then41            local packageName = string.format("packages.%s.init", name)42            local cls = require(packageName)43            assert(cls, string.format("cc.load() - package class \"%s\" load failed", packageName))44            loaded_packages[name] = cls45 46            if DEBUG > 1 then47                printInfo("cc.load() - load module \"packages.%s.init\"", name)48            end49        end50        packages[#packages + 1] = loaded_packages[name]51    end52    return unpack(packages)53end54 55local load_ = cc.load56local bind_57bind_ = function(target, ...)58    local t = type(target)59    assert(t == "table" or t == "userdata", string.format("cc.bind() - invalid target, expected is object, actual is %s", t))60    local names = {...}61    assert(#names > 0, "cc.bind() - package names expected")62 63    load_(...)64    if not target.components_ then target.components_ = {} end65    for _, name in ipairs(names) do66        assert(type(name) == "string" and name ~= "", string.format("cc.bind() - invalid package name \"%s\"", name))67        if not target.components_[name] then68            local cls = loaded_packages[name]69            for __, depend in ipairs(cls.depends or {}) do70                if not target.components_[depend] then71                    bind_(target, depend)72                end73            end74            local component = cls:create()75            target.components_[name] = component76            component:bind(target)77        end78    end79 80    return target81end82cc.bind = bind_83 84function cc.unbind(target, ...)85    if not target.components_ then return end86 87    local names = {...}88    assert(#names > 0, "cc.unbind() - invalid package names")89 90    for _, name in ipairs(names) do91        assert(type(name) == "string" and name ~= "", string.format("cc.unbind() - invalid package name \"%s\"", name))92        local component = target.components_[name]93        assert(component, string.format("cc.unbind() - component \"%s\" not found", tostring(name)))94        component:unbind(target)95        target.components_[name] = nil96    end97    return target98end99 100function cc.setmethods(target, component, methods)101    for _, name in ipairs(methods) do102        local method = component[name]103        target[name] = function(__, ...)104            return method(component, ...)105        end106    end107end108 109function cc.unsetmethods(target, methods)110    for _, name in ipairs(methods) do111        target[name] = nil112    end113end114 
jiuyhfdj/wdsm_cocos_lua_debug_shell · CoolFace