原创 安卓白屏問題

找到   frameworks\runtime-src\proj.android\src\org\cocos2dx\lua\AppActivity.java  文件 package org.cocos2dx.lua; import or

原创 lua實現查找一個字符串中的某些字符

local starts, ends = string.find(string, char) 在lua中string的下標從1開始 例: starts, ends = string.find("ahsss3", "hs") print(s

原创 安卓加載動畫崩潰

cocos2d-x-3.1.1 在 cocos2d-x/cocos/platform/CCFileUtils.cpp  DictMaker構造函數增加語句 DictMaker() : _resultType

原创 對比文件MD5差異並保存

參考 http://www.cnblogs.com/flying_bat/archive/2007/09/25/905133.html http://www.cnblogs.com/Sniper-quay/archive/2011/04/

原创 屏蔽多點觸摸

環境 cocos2d-x-3.1.1 ios版本 找到 AppController.mm   修改方法  -(BOOL)application:(UIApplication *)application didFinishLaunchin

原创 xocde項目管理

原创 ios 安卓鎖屏

參考文檔  http://blog.csdn.net/tyxkzzf/article/details/38902325 http://www.cocoachina.com/bbs/read.php?tid=206199 http://ww

原创 判斷字符串中是否包含中文

--返回值   true有中文和中文符號 function UIBase:judgeHasWord(string, displayCenter)local hasWord = falselocal lenInByte = #stringf

原创 tortoiseSVN如何提交靜態庫

問題 在commit時發現添加的靜態庫文件,svn沒有掃描出來,也就沒有任何新添加的文件可以上傳 參考: http://blog.csdn.net/csj50/article/details/6657113 解決: tortoiseSVN

原创 editbox點擊空白隱藏鍵盤

轉:http://www.cocoachina.com/bbs/read.php?tid=215852 EditBox返回鍵只隱藏虛擬鍵盤。  然後什麼都不能做了。 體驗感 好差的說。Cocos2d-x移植到Android時,有一堆J

原创 修改遊戲圖標

ios版本 http://blog.csdn.net/daydayup_chf/article/details/24807437 xcode 工程 frameworks/runtime-src/proj.ios_mac/ios 下 名爲

原创 服務器返回protobuf的數據在c++/lua中傳輸保持完整

針對問題:對於服務器返回的數據中存在‘\0’,從c++導入到lua中存在數據遺失問題 運行環境:cocos2dx-3.1.1,vs2013,protobuf2.6.1 參考資料: http://www.himigame.com/lua-g

原创 smartsvn破解版

smart svn 8.5破解版本。下載之後解壓。keygen中是svn的破解器,運行.jar文件,隨便輸入賬戶名字和郵箱地址,選擇生成smartsvn的鑰匙。安裝smart把得到的鑰匙 smartsvn.license 文件載入久可以使

原创 lua實現一個小數取整數部分

--取一個數的整數部分 function getIntPart(x)     if x<= 0 then         return math.ceil(x)     end     if math.ceil(x) == x then

原创 安卓打包修改配置

環境:cocos2d-x-3.1.1   vs2013   主要修改有兩個文件都是Android.mk 一個在   cocos2d-x\cocos\scripting\lua-bindings\Android.mk 例如: LOCA