项目工作总结

1.#import 跟#include 有什么区别 
#import指令是Object-C针对#include的改进版本,#import确保引用的文件只会被引用一次,这样就不会陷入递归包含的问题中
2.#import与@class二者的区别在于:
#import会链入该头文件的全部信息,包括实体变量和方法等;而@class只是告诉编译器,其后面声明的名称是类的名称,至于这些类是如何定义的,暂时不用考虑。在头文件中, 一般只需要知道被引用的类的名称就可以了。
不需要知道其内部的实体变量和方法,所以在头文件中一般使用@class来声明这个名称是类的名称。 而在实现类里面,因为会用到这个引用类的内部的实体变量和方法,所以需要使用#import来包含这个被引用类的头文件。
3.创建项目分支
ls
cd fileName/(fileName:在桌面创建的用来放项目的新文件夹)
ls
git clone
git clone https://git.coding.net/cying/MapleStory2.git
clone完毕后(done.)
cd MapleStory2(进入项目文件夹)
git status
git branch -a
会出现各种分支,找到自己需要的
git checkout -b develop origin/developer
将项目下载到本地
4.接广告sdk  nsobjcruntime.h 报错
http://blog.csdn.net/u010536615/article/details/52170059
5.cocos2d-lua 开发文档
http://www.cocos.com/doc/api_quick/index.html
6. 友盟sdk  http://blog.csdn.net/u013659478/article/details/34940719
   http://dev.umeng.com/social/cocos2d-x/integration#1 
7.url scheme http://www.zhihu.com/topic/19568161/newest
8.lua中数学函数  http://www.jb51.net/article/57642.htm
9.热更新  http://blog.csdn.net/cloud95/article/details/38065085
http://asqbtcupid.github.io/hotupdte-implement/       http://blog.csdn.net/cagehe/article/details/18017019
10.http://www.tuicool.com/articles/ErAvM3    http://blog.csdn.net/q277055799/article/details/8463835
11.lua分割字符串的简单方法  http://tieba.baidu.com/p/2796630392
12.lua的string库与强大的模式匹配   http://blog.csdn.net/booirror/article/details/39831869 
13.非全局函数 http://book.luaer.cn/_42.htm
14.Lua中的string库(字符串函数库)总结  http://www.jb51.net/article/57613.htm
15.【从C++过渡到Lua】  http://www.cnblogs.com/notlate/p/4310507.html
16.[Cocos2d-x]源码分析之 2d/ui/Widget  http://www.2cto.com/kf/201405/302989.html
17.cocos2dx资源加载机制(同步/异步)  http://www.2cto.com/kf/201503/383375.html
18.Cocos2d-x 3.0 http://www.cocos.com/doc/cocos2d-x-3.0/dir_1e982c3755f4172b2756317f526913d2.html
   Cocos2d-x 3.1 http://api.cocos.com/cn/d2/db1/classcocos2d_1_1ui_1_1_button.html#a7fb4cf740dae483cbc189f0d21432b77
19.Sublime Text 3 快捷键汇总  http://blog.csdn.net/cywosp/article/details/31791881
20.Lua教程  http://www.yiibai.com/lua/lua_standard_libraries.html
21.热更新
-- 从服务器获取数据
function UpdateScene:requestFromServer(url, timeout)
local request


if CHECK_UPDATE then
request = network.createHTTPRequest(function(event)
self:onResponse(event)
end, url, "GET")
end


if request then
print("[Update] 从\""..url.."\"获取数据")
request:setRequestUrl(url)
request:setTimeout(timeout or 15)
request:start()
else
print("[Update] 更新配置为不需要检查更新,直接启动")
self:startWithoutUpdate()
end
end
function UpdateScene:onResponse(event)
local request = event.request
if event.name == "completed" then
printf("REQUEST:StatusCode = %d", request:getResponseStatusCode())


if request:getResponseStatusCode() ~= 200 then
self:startWithoutUpdate()
else
printf("REQUEST:"..request:getRequestUrl()..",DataLength = %d", request:getResponseDataLength())
if request:getRequestUrl() == WEB_PATH..UPDATE_FILE then
self:saveFileList(request:getResponseData())
else
self:saveFileData(request:getResponseData())
end
end
elseif event.name ~= "progress" then
printf("REQUEST:Code = %d, Error = %s", request:getErrorCode(), request:getErrorMessage())
--self:startWithoutUpdate()
--getAlertUI():show({content=_T("socket_connectClosed"), showCloseButton=false, confirmCallback=reConnnect})
device.showAlert("提示","连接服务器失败,请重新连接。","确定", function() self:requestFromServer(WEB_PATH..UPDATE_FILE) end)
end


if event.name == "progress" and event.total > 0 then
local percent = 1
if newFileList then
percent = math.floor(event.dltotal * 100 / event.total / #newFileList.files + (downloadIndex - 1) * 100 / #newFileList.files)
else
percent = event.dltotal
end
self:setUpdatePercent(percent)
end


end







评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值