u0u0 / quick-cocos2dx-community Goto Github PK
View Code? Open in Web Editor NEWCocos2d-Lua 社区版
Home Page: http://www.cocos2d-lua.org
Cocos2d-Lua 社区版
Home Page: http://www.cocos2d-lua.org
在未进行大字体和缩小操作时,字体显示位置正常,但是比如说改为采取2倍的字体大小创建一个label,然后设置setScale(0.5f)
,然后文字部分就会出现整体的偏移。
3.6 mac版 无法创建和导入项目,player中只要点击select按钮,在对话框中选择完毕目录之后,就崩溃。调试发现崩溃在CCRenderer.cpp :: drawBatchedQuad, line743: memcpy(buf, _quadVerts, sizeof(_quadVerts[0])* _numberQuads * 4);
buf 为 Null
这里。
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] ----------------------------------------
如上所示, 文件名后面都是...了!
这应该是引入官方库时就存在的Bug。
getVirtualRendererSize无法获取高度,即使在之前formatText也不行,只能获取setContentSize时的高度。
这两篇文章也许有帮助:
http://www.it165.net/pro/html/201412/29300.html
http://blog.csdn.net/lnslc/article/details/50040069
另外,UIRichText在处理超长且有换行的文本时,setContentSize经常失效,导致文字超出ContentSize的宽度,跑到外面去了。
请问下这个是什么原因? 有什么区别吗? 谢谢!
用这个来查找cocostudio节点的时候,一直返回nil
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)
更新最新的git代码后,,跑android EditBox控件不弹出键盘
你好,非常感谢你们对开源世界作出的贡献和努力。我看到Quick-Cocos2dx-Community在3.6.2Beta版时就已经使用了LuaJIT 2.1.0, 然后在3.6.4 Release 版本更新说明里说有支持 Luajit 64一项,想请问下到底是哪个版本开始支持64位的?谢谢。
如果一个操作系统下存在多个版本的工程,想我的项目除了当前社区版本,目前存在quick-3.3-fina 的版本,这样子工程那个就比较麻烦了,个人建议修改成把cocos 拷贝到工程目录下,这样子每个项目是可以互不干扰的。
ccMacros.h
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
player.sln用VC2013打开后,把五个工程的工具集设置成vc12_xp后,编译后说snprintf找不到。上面是修改方法
编译通过,连接错误。有些lib使用vc2015预先编译,郁闷,我的368机器没空间安装vc2015了。
也沒有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,該如何設置?
謝謝!!
请问下如果sprite有上千个,就是地面是由上千个不同的小格子组成的,只能创建上千个sprite吗,不是同样的地面,不能用SpriteBatchNode,如何优化,跪谢!@u0u0
请问这个能修一下吗
当场景有粒子对象时,部分安卓设备锁屏后恢复出现画面混乱或黑屏的现象(测试设备红米3(系统5.1.1) 三星s6(系统6.0.1))
Error :
CMake Error: The source directory "D:/repo/Quick-Cocos2dx-Community" does not ap
pear to contain CMakeLists.txt.
D:/repo is my project directory
I thin you remove CMakeLists.txt from the main directory
RenderTexture的command执行是异步的,但是RenderTexture会被移出舞台而销毁,这时候异步执行的commond会碰到一个空指针,导致闪退。
具体例子见
http://www.cnblogs.com/wantnon/p/4403401.html
希望下个版本能把autorelease绑定放出来
就是透明部分还是当有颜色显示了,怎么办?
就是并没有遮罩只是裁剪了图片而已,图片是按矩形裁剪的,不是按模板的不透明(或者说>0.05)的区域裁剪,在pc正常,但是在Android真机及其模拟器,均只是矩形裁剪
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 ?
#if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID || (defined ANDROID_USE_CURL))
#include "curl/curl.h"
#endif
#if ((CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) && !(defined ANDROID_USE_CURL))
, m_httpConnect(NULL)
, m_cookies(NULL)
, m_nTimeOut(0)
#else
#if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID || (defined ANDROID_USE_CURL))
CURL *m_curl;
curl_httppost *m_formPost;
curl_httppost *m_lastPost;
#endif
#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
----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
"%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
"$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"
今天写了一个 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手机,更新到最新代码,当页面存在ccui.EditBox编辑控件节点时,锁屏再进入页面,点击编辑控件,输入面板无法弹出。各位都试试,如果有正常的,也麻烦告知。
请问:旧语法与新语法的文档该取哪里下载?
多谢@u0u0
使用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
92 self.direction = params.direction or UIScrollView.DIRECTION_VERTICAL
...
103 self:setDirection(params.direction)
应该为:self:setDirection(self.direction)
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("")
置为空了。
还有,我发现多个输入框在同个位置时,也会有问题。
新的输入框不响应了。
现在用2015导入工程各种错误..
java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libogg.so" needed by "libcocos2dlua.so"; caused by load_library(linker.cpp:745): library "libogg.so" not found
3.7下点击事件监听是什么啊?
NodeEx中有个scheduleUpdate函数,一般情况下工作正常,但有些例外:
1.如果这个Node是放在display.getRunningScene()中,这种情况下这个函数无法工作
2.如果这个Node是ccui.ScrollView,也无法工作
测试了一下,在 player 没有问题,但是跑 android 真机的时候出现了。
网上查了一下,说是在 Android.mk 文件中加入 -fsigned-char 编译就好了, 不过我看了一下代码,是已经加上了的,请问有其他人遇到么?
有一个比较偷懒的方式,但是我不太想用,就是回过头使用 readByte() 然后超过 127 的都减去 256 来求得负值范围。
363中,cocostudio2.0.6,获取完pageview之后运行scrollToPage会发生偏移,而且会有快速翻页的那种效果
能否提供VS2015的版本呢?
环境:win10 64位 vs2013
完全按照tools/tolua下的readme配置,增加dragonbones.ini 修改genbindings.py 拷贝dragonbonescpp 生成lua绑定的时候产生docsunix不是内部或外部命令的错误
注释后有多个请求时会挂掉
libc: pthread_create failed: couldn't allocate 1036288-bytes mapped space: Out of memory
???,感觉好久没更新了呢。
却少
http.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
等代码
{
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
}
以下的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
...
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
现在有个需求想直接使用 swf 导出动画给项目使用,找了一下,发现 GAF 还是不错的,想问一下是否考虑加进去么?
接入参考: Cocos2dxGAFPlayer
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.
因为 android 6.0 以上对权限管理更加严格了,如果没有检测权限是否拥有而直接调用会引起程序 crash,目前的 android 代码中没有针对这一块做处理吧?
输出提示:
[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->
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.