Giter VIP home page Giter VIP logo

u0u0 / quick-cocos2dx-community Goto Github PK

View Code? Open in Web Editor NEW
552.0 73.0 256.0 378.54 MB

Cocos2d-Lua 社区版

Home Page: http://www.cocos2d-lua.org

Python 0.08% Shell 0.01% Batchfile 0.01% C++ 44.61% C 49.55% Makefile 0.12% Objective-C++ 1.23% Objective-C 0.72% Java 0.87% GLSL 0.18% Lua 2.59% Csound Document 0.03% Perl 0.01%
cocos2d-lua quick-cocos2d-x-lua spine dragonbones cocostudio opengl openapi cocos2d-x

quick-cocos2dx-community's People

Contributors

8liang avatar chgowolf avatar cuit-zhaxin avatar doitian avatar insama avatar ivenyang avatar jianyuemingsha avatar lbfamous avatar lgvi avatar liaoer avatar maxize avatar qinhanlei avatar renshan avatar sebastianleecn avatar shengdoushi avatar shinewu avatar sunhantao avatar superzscy avatar u0u0 avatar ywxzm avatar zzya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quick-cocos2dx-community's Issues

3.6 mac版 无法创建和导入项目

3.6 mac版 无法创建和导入项目,player中只要点击select按钮,在对话框中选择完毕目录之后,就崩溃。调试发现崩溃在CCRenderer.cpp :: drawBatchedQuad, line743: memcpy(buf, _quadVerts, sizeof(_quadVerts[0])* _numberQuads * 4); buf 为 Null
这里。

ios编译成功后运行奔溃

ios下使用3.6.5版本新建项目后编译,编译成功,但是运行的时候奔溃,错误出现在CCLuaStack.cpp的第130行:
bool LuaStack::init(void) { _state = lua_open(); luaL_openlibs(_state);
我不太会调试,只是看到_state为NULL,并下载了git上最新的代码测试仍旧这个bug。
我的xcode是8.2.1,ios sdk 是10.2

错误堆栈信息无文件路径显示不全

[LUA-print] ----------------------------------------
[LUA-print] LUA ERROR: [string "/Users/bilt/Documents/Quick-Cocos2dx-Communit..."]:161: attempt to perform arithmetic on global 'a' (a nil value)

[LUA-print] 
stack traceback:
    [string "/Users/bilt/Documents/Quick-Cocos2dx-Communit..."]:161: in function 'listener_'
    [string "framework/cocos2dx/NodeEx.lua"]:428: in function <[string "framework/cocos2dx/NodeEx.lua"]:382>
[LUA-print] ----------------------------------------

如上所示, 文件名后面都是...了!

Android Studio ndkBuild 支持

Android Studio 已经支持 NDK 了 https://developer.android.com/studio/projects/add-native-code.html

实际测试只需要修改 libcocos2dx/build.gradle

apply plugin: 'com.android.library'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        minSdkVersion 10
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters 'armeabi', 'armeabi-v7a', 'x86'
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    externalNativeBuild {
        ndkBuild {
            path 'jni/Android.mk'
        }
    }

    sourceSets.main {
    	jniLibs.srcDir 'src/main/libcocos2dx'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.3.0'
}

然后就是修改 Android.mk,直接使用环境变量 QUICK_V3_ROOT

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := cocos2dlua_shared

LOCAL_MODULE_FILENAME := libcocos2dlua

LOCAL_SRC_FILES := hellolua/main.cpp \
../../../Classes/VisibleRect.cpp \
../../../Classes/AppDelegate.cpp

LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../../Classes \
$(QUICK_V3_ROOT)/external \
$(QUICK_V3_ROOT)/quick/lib/quick-src \
$(QUICK_V3_ROOT)/quick/lib/quick-src/extra

LOCAL_STATIC_LIBRARIES := cocos2d_lua_static
LOCAL_STATIC_LIBRARIES += lua_extensions_static
LOCAL_STATIC_LIBRARIES += extra_static

include $(BUILD_SHARED_LIBRARY)

$(call import-add-path,$(QUICK_V3_ROOT))
$(call import-add-path,$(QUICK_V3_ROOT)/cocos)
$(call import-add-path,$(QUICK_V3_ROOT)/quick/lib)
$(call import-add-path,$(QUICK_V3_ROOT)/external)
$(call import-add-path,$(QUICK_V3_ROOT)/cocos/scripting)
$(call import-module,scripting/lua-bindings/proj.android)

$(call import-module, quick-src/lua_extensions)
$(call import-module, quick-src/extra)

请问是在哪个版本开始支持IOS64位开发的?

你好,非常感谢你们对开源世界作出的贡献和努力。我看到Quick-Cocos2dx-Community在3.6.2Beta版时就已经使用了LuaJIT 2.1.0, 然后在3.6.4 Release 版本更新说明里说有支持 Luajit 64一项,想请问下到底是哪个版本开始支持64位的?谢谢。

Need #define snprintf _snprintf on Windows VC2013 编译出错解决

ccMacros.h

#ifdef _MSC_VER
#define snprintf _snprintf
#endif

player.sln用VC2013打开后,把五个工程的工具集设置成vc12_xp后,编译后说snprintf找不到。上面是修改方法

编译通过,连接错误。有些lib使用vc2015预先编译,郁闷,我的368机器没空间安装vc2015了。

player 下沒有執行檔,不能開啟。

也沒有player3.exe.
沒法開啟。

而在vs2015 community版,打開,proj.win32,
用player.sln開啟,
build player3.

有錯誤訊息,
1>..\network\SocketIO.cpp(442): error C2039: 'back_inserter': is not a member of 'std'
1> D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\sstream(12): note: see declaration of 'std'
1>..\network\SocketIO.cpp(442): error C3861: 'back_inserter': identifier not found
2>------ Build started: Project: player3, Configuration: Debug Win32 ------
2>LINK : fatal error LNK1104: cannot open file 'libcurl.lib'
========== Build: 0 succeeded, 2 failed, 3 up-to-date, 0 skipped ==========

請問libcurl.lib,該如何設置?

謝謝!!

3.6在android真机,看不到clippingNode遮罩透明

就是透明部分还是当有颜色显示了,怎么办?
就是并没有遮罩只是裁剪了图片而已,图片是按矩形裁剪的,不是按模板的不透明(或者说>0.05)的区域裁剪,在pc正常,但是在Android真机及其模拟器,均只是矩形裁剪

CCHTTPRequest

When I use Nexus5 os = Android 4.4, QuickHTTPInterface class will throw exception.
So I want to use curllib , , after all,I have packed the static curlib.a into my .so file.

I try to compile with CCHTTPRequest.cpp instead of CCHTTPRequestAndroid.cpp ,at last i use a macro to control those codes.
if you define the ANDROID_USE_CURL = 1 in file "build_native_release" the code will work well.

Your team can merge my code into develop branch as your wish ?

CCHTTPRequest.h LINE:24

#if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID || (defined ANDROID_USE_CURL))
#include "curl/curl.h"
#endif

CCHTTPRequest.h LINE:158

#if ((CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) && !(defined ANDROID_USE_CURL))
    , m_httpConnect(NULL)
    , m_cookies(NULL)
    , m_nTimeOut(0)
#else

CCHTTPRequest.h LINE:189

#if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID || (defined ANDROID_USE_CURL))
    CURL *m_curl;
    curl_httppost *m_formPost;
    curl_httppost *m_lastPost;
#endif

CCHTTPRequest.h LINE:207

#if ((CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) && !(defined ANDROID_USE_CURL))
    jobject m_httpConnect;
    const char* m_httpMethod;
    Fields m_postFile;
    Fields m_postContent;
    int m_nTimeOut;
    const char* m_cookies;
#endif

./quick/lib/quick-src/extra/Android.mk

----1------

LOCAL_SRC_FILES := \
    $(LOCAL_PATH)/luabinding/cocos2dx_extra_luabinding.cpp \
    $(LOCAL_PATH)/luabinding/HelperFunc_luabinding.cpp \
    $(LOCAL_PATH)/apptools/HelperFunc.cpp \
    $(LOCAL_PATH)/crypto/CCCrypto.cpp \
    $(LOCAL_PATH)/crypto/base64/libbase64.c \
    $(LOCAL_PATH)/network/CCNetwork.cpp \
    $(LOCAL_PATH)/platform/android/CCCryptoAndroid.cpp \
    $(LOCAL_PATH)/platform/android/CCNativeAndroid.cpp \
    $(LOCAL_PATH)/platform/android/CCNetworkAndroid.cpp
# for curl compile
ifeq ($(ANDROID_USE_CURL),1)
LOCAL_SRC_FILES += $(LOCAL_PATH)/network/CCHTTPRequest.cpp
else
LOCAL_SRC_FILES += $(LOCAL_PATH)/platform/android/CCHTTPRequestAndroid.cpp
endif

-----2-----

LOCAL_C_INCLUDES := $(LOCAL_EXPORT_C_INCLUDES) \
                    $(COCOS2DX_ROOT)/cocos \
                    $(COCOS2DX_ROOT)/external/lua/luajit/include \
                    $(COCOS2DX_ROOT)/external/lua/tolua \
                    $(COCOS2DX_ROOT)/external \
                    $(COCOS2DX_ROOT)/cocos/scripting/lua-bindings/manual
# for curl compile
ifeq ($(ANDROID_USE_CURL),1)
LOCAL_C_INCLUDES += $(COCOS2DX_ROOT)/external/curl/include/android
endif

build_native_release.bat @ last line

"%ANDROID_NDK_ROOT%\ndk-build" %ANDROID_NDK_BUILD_FLAGS% ANDROID_USE_CURL=%ANDROID_USE_CURL% NDK_DEBUG=%NDK_DEBUG% %NDK_BUILD_FLAGS% -C %APP_ANDROID_ROOT% NDK_MODULE_PATH=%APP_ANDROID_ROOT%;%COCOS2DX_ROOT%;%COCOS2DX_ROOT%/cocos;%COCOS2DX_ROOT%/quick/lib;%COCOS2DX_ROOT%/external;%COCOS2DX_ROOT%/cocos/scripting;%APP_ANDROID_ROOT%/../Classes

build_native_release.sh @last line

"$ANDROID_NDK_ROOT"/ndk-build $ANDROID_NDK_BUILD_FLAGS \
                              ANDROID_USE_CURL=$ANDROID_USE_CURL \
                              NDK_DEBUG=$NDK_DEBUG $NDK_BUILD_FLAGS \
                              -C "$APP_ANDROID_ROOT" $* \
"NDK_MODULE_PATH=${APP_ANDROID_ROOT}:${COCOS2DX_ROOT}:${COCOS2DX_ROOT}/cocos:${COCOS2DX_ROOT}/quick/lib:${COCOS2DX_ROOT}/external:${COCOS2DX_ROOT}/cocos/scripting:${APP_ANDROID_ROOT}/../Classes"

使用 luaoc.callStaticMethod 调用 Objective-C 方法时报错 not support return type

今天写了一个 lua 调用 iOS 的同步回调遇到了这个问题。
一开始直接跟的源码,然后发现使用 NSMethodSignature 获取到的 methodReturnType 就是 'B'。
之前没怎么写过 oc 代码,所以 Google 之。

发现了在 Quick-x 最早的时候( 2 Nov 2015 )有这么一个 issue:

使用luaoc.callStaticMethod调用Objective-C方法时报错not support return type

顺便去看了一下 cocos2d-x 的源码,发现也修复了,追溯到是在 2017 年 6 月份修复的

luaoc static function return type BOOL #17956

解决方案: 使用 @encode 关键字转化来进行字符串比较。

以下是改动后的代码:

// in CCLuaObjcBridge.mm on line 123
if (returnLength > 0)
{
    if (strcmp(returnType, @encode(id)) == 0)
    {
        id ret;
        [invocation getReturnValue:&ret];
        pushValue(L, ret);
    }
    else if (strcmp(returnType, @encode(BOOL)) == 0) // BOOL
    {
        char ret;
        [invocation getReturnValue:&ret];
        lua_pushboolean(L, ret);
    }
    else if (strcmp(returnType, @encode(int)) == 0) // int
    {
        int ret;
        [invocation getReturnValue:&ret];
        lua_pushinteger(L, ret);
    }
    else if (strcmp(returnType, @encode(float)) == 0) // float
    {
        float ret;
        [invocation getReturnValue:&ret];
        lua_pushnumber(L, ret);
    }
    else
    {
        NSLog(@"not support return type = %s", returnType);
        lua_pushnil(L);
    }
}

@u0u0 麻烦看一下,谢谢。

Android network.createHTTPRequest不能返回200以外code值

应用场景:

使用network.createHTTPRequest和RestAPI服务器通信,服务器返回200以外code值在Android平台抛出异常,player里可以正常返回(code:401)。

异常信息:

01-22 18:42:49.341: E/QuickHTTPInterface(12642): java.io.FileNotFoundException: https://api.bmob.cn/1/users/123

iOS没有调试,好像也不能返回。

测试代码:
local MainScene = class("MainScene", function()
    return display.newScene("MainScene")
end)

function MainScene:ctor()
    self.code = cc.ui.UILabel.new({
        UILabelType = 2, text = "Hello, World", size = 64})
    :align(display.CENTER, display.cx, display.cy)
    :addTo(self)

    self.text = cc.ui.UILabel.new({
        UILabelType = 2, text = "Hello, World", size = 34})
    :align(display.CENTER_TOP, display.cx, display.cy-100)
    :addTo(self)


    self.text:setDimensions(540, 0)

    cc.ui.UIPushButton.new("common_blue.png")
    :align(display.CENTER, display.cx, display.cy+100)
    :addTo(self)
    :onButtonClicked(function()
            self:DoHttp()
        end)
end

-- 添加
function MainScene:DoHttp()
    local function onRequestFinished(event)
        local ok = (event.name == "completed")
        local request = event.request

        if not ok then
            -- 请求失败,显示错误代码和错误消息
            print(request:getErrorCode(), request:getErrorMessage())
            self.code:setString(request:getErrorCode())
            self.text:setString(request:getErrorMessage())
            return
        end

        local code = request:getResponseStatusCode()
        if code ~= 200 then
            -- 请求结束,但没有返回 200 响应代码
            print(code)
            self.code:setString(code)
            self.text:setString(request:getResponseString())
            return
        end


        self.code:setString(code)
        self.text:setString(request:getResponseString())

        -- 请求成功,显示服务端返回的内容
        local response = request:getResponseString()
        print(response)
    end
    local request = network.createHTTPRequest(onRequestFinished, "https://api.bmob.cn/1/users", "GET")

    request:start()
end

function MainScene:onEnter()
end

function MainScene:onExit()
end

return MainScene

UIListView.lua 103行 有个小bug

92 self.direction = params.direction or UIScrollView.DIRECTION_VERTICAL
...
103 self:setDirection(params.direction)

应该为:self:setDirection(self.direction)

使用 UIInput 的时候,点击输入,完成后,隐藏父节点,输入光标还在

RT,使用 UIInput 的时候出现这个问题,是因为没有设置什么东西么?
我翻了一下源码,这里没有一个 setFocus 的方法,不知道是不是用法有问题,或者有其他不清楚的操作方式。

        local inputBg = display.newScale9Sprite("images/input_bg.png", posXRight, posY - 10,
            cc.size(312, 45))
            :addTo(parentNode)
        inputBg:setAnchorPoint(cc.p(0, 0.5))
        local input = cc.ui.UIInput.new({
                image    = "images/blank.png",
                size     = cc.size(312, 45),
                fontSize = 22,
                listener = function (event, editbox)
                    if event == "return" then
                        input:setPlaceHolder("")
                    end
                end,
            })
            :align(display.CENTER, inputBg:getContentSize().width / 2, (inputBg:getContentSize().height - 6) / 2)
            :addTo(inputBg)
        input:setMaxLength(15)
        input:setFontColor(cc.c3b(0, 0, 0))
        input:setPlaceHolder("")
        input:setInputFlag(cc.EDITBOX_INPUT_FLAG_PASSWORD)
        input:setReturnType(cc.KEYBOARD_RETURNTYPE_DONE)

我大概这么写的代码,完成输入调用 input:setText("") 置为空了。
还有,我发现多个输入框在同个位置时,也会有问题。
新的输入框不响应了。

scheduleUpdate的bug

NodeEx中有个scheduleUpdate函数,一般情况下工作正常,但有些例外:
1.如果这个Node是放在display.getRunningScene()中,这种情况下这个函数无法工作
2.如果这个Node是ccui.ScrollView,也无法工作

使用 ByteArray 的时候,readChar() 如果是 -1 的时候返回的是 255

测试了一下,在 player 没有问题,但是跑 android 真机的时候出现了。
网上查了一下,说是在 Android.mk 文件中加入 -fsigned-char 编译就好了, 不过我看了一下代码,是已经加上了的,请问有其他人遇到么?
有一个比较偷懒的方式,但是我不太想用,就是回过头使用 readByte() 然后超过 127 的都减去 256 来求得负值范围。

pageview:scrolltopage

363中,cocostudio2.0.6,获取完pageview之后运行scrollToPage会发生偏移,而且会有快速翻页的那种效果

继承dragonbones

环境:win10 64位 vs2013
完全按照tools/tolua下的readme配置,增加dragonbones.ini 修改genbindings.py 拷贝dragonbonescpp 生成lua绑定的时候产生docsunix不是内部或外部命令的错误

runtime-src iOS模拟器奔溃,真机正常

{
gl.supports_vertex_array_object: true
cocos2d.x.version: Quick-Cocos2dx-Community 3.6.3 Release
gl.vendor: Apple Inc.
gl.supports_PVRTC: true
gl.renderer: Apple Software Renderer
cocos2d.x.compiled_with_profiler: false
gl.max_texture_size: 4096
gl.supports_ETC1: false
gl.supports_BGRA8888: false
cocos2d.x.build_type: DEBUG
gl.supports_discard_framebuffer: true
gl.supports_NPOT: true
gl.supports_ATITC: false
gl.max_samples_allowed: 4
gl.max_texture_units: 8
cocos2d.x.compiled_with_gl_state_cache: true
gl.supports_S3TC: false
gl.version: OpenGL ES 2.0 APPLE-12.4.2
}

chipmunk异常

以下的commit会导致chipmunk在iphone上表现异常:

diff --git a/external/chipmunk/include/chipmunk/chipmunk_types.h b/external/chipmunk/include/chipmunk/chipmunk_types.h
index fdfb6d1..9ed2339 100644
--- a/external/chipmunk/include/chipmunk/chipmunk_types.h
+++ b/external/chipmunk/include/chipmunk/chipmunk_types.h
@@ -5,9 +5,9 @@
#include "TargetConditionals.h"
#endif

-//#if ((TARGET_OS_IPHONE == 1) || (TARGET_OS_MAC == 1)) && (!defined CP_USE_CGPOINTS)
-// #define CP_USE_CGPOINTS 1
-//#endif
+#if ((TARGET_OS_IPHONE == 1) || (TARGET_OS_MAC == 1)) && (!defined CP_USE_CGPOINTS)

  •   #define CP_USE_CGPOINTS 1
    
    +#endif

...

闪退现象(3.7.0 3.7.1都有这个问题)

IOS游戏启动时,双击HOME键,把进程杀掉,再启动游戏,会有很大的概率在闪屏结束时出现闪退,请问这是什么问题,以下是崩溃日志
只在真机出现,虚拟机运行不出现,3.7.0 3.7.1都有这个问题

OS Version: iPhone OS 11.1.2 (15B202)
Baseband Version: 3.21.01
Report Version: 104

Exception Type: EXC_BAD_ACCESS (SIGKILL - CODESIGNING)
Exception Subtype: unknown at 0x0000000104c77ce4
VM Region Info: 0x104c77ce4 is in 0x104c68000-0x104c78000; bytes after start: 64740 bytes before end: 795
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
MALLOC_LARGE 0000000104c64000-0000000104c68000 [ 16K] rw-/rwx SM=PRV
---> VM_ALLOCATE 0000000104c68000-0000000104c78000 [ 64K] r-x/rwx SM=COW
GAP OF 0x98000 BYTES
VM_ALLOCATE 0000000104d10000-0000000104d30000 [ 128K] rw-/rwx SM=PRV

Termination Reason: Namespace CODESIGNING, Code 0x2
Triggered by Thread: 0

Filtered syslog:
None found

Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 ??? 0x0000000104c77ce4 0 + 4375149796
1 pokers iOS 0x00000001010e8f94 lj_cf_package_require + 464
2 pokers iOS 0x000000010108ad14 lj_BC_FUNCC + 44
3 pokers iOS 0x00000001010e8f94 lj_cf_package_require + 464
4 pokers iOS 0x000000010108ad14 lj_BC_FUNCC + 44
5 pokers iOS 0x00000001010e8f94 lj_cf_package_require + 464
6 pokers iOS 0x000000010108ad14 lj_BC_FUNCC + 44
7 pokers iOS 0x00000001010e8f94 lj_cf_package_require + 464
8 pokers iOS 0x000000010108ad14 lj_BC_FUNCC + 44
9 pokers iOS 0x000000010109fa88 lua_pcall + 164
10 pokers iOS 0x0000000100e35de0 cocos2d::LuaStack::executeFunction(int) + 4316640 (CCLuaStack.cpp:394)
11 pokers iOS 0x0000000100e34af4 cocos2d::LuaStack::executeString(char const*) + 4311796 (CCLuaStack.cpp:226)
12 pokers iOS 0x0000000100a717dc AppDelegate::applicationDidFinishLaunching() + 366556 (AppDelegate.cpp:140)
13 pokers iOS 0x000000010110ff9c cocos2d::Application::run() + 7307164 (CCApplication-ios.mm:53)
14 pokers iOS 0x0000000100ba7320 -[AppController application:didFinishLaunchingWithOptions:] + 1635104 (AppController.mm:122)
15 UIKit 0x000000018a3679bc -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 384
16 UIKit 0x000000018a55b080 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3428
17 UIKit 0x000000018a55fecc -[UIApplication _runWithMainScene:transitionContext:completion:] + 1712
18 UIKit 0x000000018a7f66a8 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 800
19 UIKit 0x000000018aacac6c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 160
20 UIKit 0x000000018a7f630c -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 252
21 UIKit 0x000000018a7f6b7c -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 748
22 UIKit 0x000000018af724b8 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 260
23 UIKit 0x000000018af7235c -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 448
24 UIKit 0x000000018ace4294 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 220
25 UIKit 0x000000018ae7b0ac _performActionsWithDelayForTransitionContext + 112
26 UIKit 0x000000018ace4144 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 252
27 UIKit 0x000000018aaca2cc -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 364
28 UIKit 0x000000018a55e610 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 540
29 UIKit 0x000000018a96c870 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 364
30 FrontBoardServices 0x000000018356d758 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 364
31 FrontBoardServices 0x0000000183576060 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 224
32 libdispatch.dylib 0x0000000180845048 _dispatch_client_callout + 16
33 libdispatch.dylib 0x000000018084c6c8 _dispatch_block_invoke_direct$VARIANT$mp + 288
34 FrontBoardServices 0x00000001835a19f4 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 36
35 FrontBoardServices 0x00000001835a1698 -[FBSSerialQueue _performNext] + 404
36 FrontBoardServices 0x00000001835a1c34 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
37 CoreFoundation 0x0000000180e6a2e8 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24
38 CoreFoundation 0x0000000180e6a268 __CFRunLoopDoSource0 + 88
39 CoreFoundation 0x0000000180e69af0 __CFRunLoopDoSources0 + 204
40 CoreFoundation 0x0000000180e676c8 __CFRunLoopRun + 1048
41 CoreFoundation 0x0000000180d87fb8 CFRunLoopRunSpecific + 436
42 GraphicsServices 0x0000000182c1ff84 GSEventRunModal + 100
43 UIKit 0x000000018a35c2e8 UIApplicationMain + 208
44 pokers iOS 0x0000000100ba5d24 main + 1629476 (main.m:13)
45 libdyld.dylib 0x00000001808aa56c start + 4

ios11 Call to unavailable function 'system': not available on iOS

void AssetsManager::destroyStoragePath()
{
// Delete recorded version codes.
deleteVersion();

// Remove downloaded files

#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
string command = "rd /s /q ";
// Path may include space.
command += """ + _storagePath + """;
system(command.c_str());
#else
string command = "rm -r ";
// Path may include space.
command += """ + _storagePath + """;
system(command.c_str());
#endif

Call to unavailable function 'system': not available on iOS
iOS好像弃用了这个方法,cocos官方修复是用nftw.

热更新失败

输出提示:
[LUA-print] 发现新版本,开始升级 1.0.1
[LUA-print] [INFO] 游戏更新(5):, assetId->@manifest, percent->-1.#INF, percentBy
File->0, message->
[LUA-print] 正在更新文件 : @manifest
[LUA-print] [INFO] 游戏更新(3):, assetId->, percent->-1.#INF, percentByFile->0,
message->
[LUA-print] 发现新版本,开始升级 1.0.1
[LUA-print] [INFO] 游戏更新(5):, assetId->, percent->0, percentByFile->0, messag
e->Start to update 3 files from remote package.
[LUA-print] 正在更新文件 :
[LUA-print] [INFO] 游戏更新(5):, assetId->, percent->1.#INF, percentByFile->0, m
essage->
[LUA-print] 正在更新文件 :
[LUA-print] [INFO] 游戏更新(7):, assetId->res/project.manifest, percent->1.#INF,
percentByFile->0, message->Unable to download file
[LUA-print] 更新过程中遇到错误
[LUA-print] [INFO] 游戏更新(7):, assetId->res/up2.png, percent->1.#INF, percentB
yFile->0, message->Unable to download file
[LUA-print] 更新过程中遇到错误
[LUA-print] [INFO] 游戏更新(7):, assetId->res/version.manifest, percent->1.#INF,
percentByFile->0, message->Unable to download file
[LUA-print] 更新过程中遇到错误
[LUA-print] [INFO] 游戏更新(9):, assetId->, percent->1.#INF, percentByFile->0, m
essage->

获取语言ID问题

Cocos2dConstants.lua

cc.LANGUAGE_DUTCH = 6
cc.LANGUAGE_RUSSIAN = 7
cc.LANGUAGE_KOREAN = 8
cc.LANGUAGE_JAPANESE = 9
cc.LANGUAGE_HUNGARIAN = 10
cc.LANGUAGE_PORTUGUESE = 11
cc.LANGUAGE_ARABIC = 12

6号开始缺失cc.LANGUAGE_DUTCH,cc.LANGUAGE_RUSSIAN开始,后面的ID依次加1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.