原创 IOS 提交APP 的坑 ITMS-90184: Invalid architectures

採用 Cocos 2dx 3.16 Xcode 10上傳APP時收到郵件 原以爲是Xcode版本的問題後才知道是 deployment targets的問題   ITMS-90184: Invalid architectures - T

原创 cocos2dx 3.16中spine版本向下兼容 timeline slipX slipY

在引用了一個spine 出現如下報錯: cocos Invalid timeline type for a bone: flipX   spine 的高版本中已經沒有 filpX 和filpY了 cocos 3.16中也已經不再支持 於是

原创 cocos2dx 在UIText等文字控件 在安卓平臺文字內容顯示不全的bug

  找到 CCFontAtlas.cpp在FontAtlas::conversionU32TOGB2312 方法中 改爲conversionEncodingJNI((char*)u32Text.c_str(), gb2312StrSize

原创 Cocos2d-x Lua Layer:onTouch

在cocos2dx Lua工程的源碼中 LayerEx.lua中 有擴充的onTouch方法如下: function Layer:onTouch(callback, isMultiTouches, swallowTouches)

原创 cocos 2dx Lua 點擊區域判斷

onTouch見 上篇  self:onTouch(function (event)     print("----", event.x, event.y, event.name)     local point = cc.p(even

原创 cocos 2dx ccui.ScrollView 中添加按鈕 ccui.Button的影響到滑動的bug

cocos studio 中的ScrollView 爲ccui.ScrollView  不是CCScrollView在項目中遇到 在滑動中添加 node節點 節點中包括按鈕的情況下 按鈕的區域會屏蔽掉 滑動的效果直接 在 滑動中加按鈕則不

原创 cocos studio json文件逆向裝 成csd 文件

在微信小遊戲中扒了一些動畫資源,確定是cocos studio導出的 用node做了一個腳本逆向轉換爲csd原工程文件  思路是 主要是 json格式轉成xml 格式的逆向推理 cocos studio 是 3.10版本 https://

原创 cocos2dx 3.16中spine向下兼容 timeline slipX slipY

在引用了一個spine 出現如下報錯: cocos Invalid timeline type for a bone: flipX   spine 的高版本中已經沒有 filpX 和filpY了 cocos 3.16中也已經不再支持 於是

原创 windows 下sublime text lua語言的環境配置

1.下載sublime text3 地址http://www.sublimetext.com/3 下載好之後,默認安裝即可 2.lua靜態編譯庫設置 獲取http://download.csdn.net/detail/ooomyself/

原创 支付寶sdk接入安卓在沒安裝支付寶的情況下

在安卓支付寶sdk接入中,接入完成後可以調用支付(安裝了支付寶的情況下) 但是在沒有安裝支付寶的情況下沒有響應!應該是掉到webview進行登錄支付的 原因 解決 在 Manifest中加入         <activity      

原创 Lua String 的擴展函數

字符串分割函數返回 Table string.split = function(line, sep)     sep = sep or ' '     local retval = {}     local pos = 1     whi

原创 lua 在cocos2dx 2.2 中的觸摸事件

local function onTouchEvent(eventType, x, y) return true end self:registerScriptTouchHandler(onTouchEve

原创 Lua 深打印

table.print = function(t, tname, print_one_level) if type(t) ~= "table" then print("deep_print error, parameter acce

原创 lua 的常用math 函數

<pre name="code" class="html">math.sqrt() -- 開平方 -- math.ceil() 取整函數local num = math.ceil(33.33333)函數名 描述 示例 結果 pi

原创 table的一些擴展方法

table.print = function(t, tname, print_one_level) if type(t) ~= "table" then print("deep_print error, parameter acce