hi man

博客园 首页 新随笔 联系 订阅 管理

2012年11月25日 #

摘要: bool HelloWorld::init(){ CCTimer::timerWithTarget(this,schedule_selector( HelloWorld::testTimerCB), 1); this->schedule(schedule_selector( HelloWorld::testTimerCB), 1); return true;} 阅读全文
posted @ 2012-11-25 19:18 KuPig 阅读(2078) 评论(0) 推荐(0) 编辑

摘要: #include <time.>struct cocos2d::cc_timeval now; // 秒,毫秒cocos2d::CCTime::gettimeofdayCocos2d(&now, NULL);struct tm * tm;tm = localtime(&now.tv_sec);int year = tm->tm_year + 1900;int month = tm->tm_mon + 1;int day = tm->tm_mday;注意:在CCTime::gettimeofdayCocos2d函数中CC_UNUSED_PARAM为消 阅读全文
posted @ 2012-11-25 19:14 KuPig 阅读(5106) 评论(1) 推荐(0) 编辑