- 博客(3)
- 资源 (3)
- 收藏
- 关注
原创 cocos2d-x获取系统日期或时间
cocos2d-x 3.x后原本CCTime被弃用,所以,只能使用C库中的获取系统日期和时间struct timeval nowTimeval;gettimeofday(&nowTimeval, NULL);struct tm * tm;time_t time_sec ;time_sec = nowTimeval.tv_sec;tm = localtime(&time_sec
2015-06-18 15:29:45 727
原创 std::string字符串分割
废话不多说,直接上代码:std::vector split(std::string str, std::string pat){ std::vector bufStr; while (true) { int index = str.find(pat); std::string subStr = str.substr(0, index); if (!subStr.empty(
2015-06-18 10:09:53 2859
原创 Cocos2d-x 3.x 头像选择器,本地相册与拍照+头像编辑功能(Android、IOS双平台实现)
在应用甚至游戏当中会常常有用户上传头像的功能,在网上找了N多资料发现没有人具体介绍过该用cocos2d-x实现。这篇文章就来介绍一下如何在Android和IOS平台上实现该功能。先传一张完成后的图片一饱眼福:直接上代码:ImagePicker.h/**************************************************************
2015-06-04 18:31:38 5865 10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人