- 博客(6)
- 资源 (3)
- 收藏
- 关注
原创 跟我来用cocos2d-x做一个游戏 Sky Defense
游戏截图 Sky Defense 是cocos2d-x by Example Beginner's Guide,第4章的游戏示例。 先从GameLayer::init()说起,游戏的大部分初始化,都是在这里做的。 //zeek. _screenSize = CCDirector::sharedDirector()->getWinSize(); gameCreateScree
2013-11-27 22:18:09 1693
原创 在ccTouchesBegan 用;boundingBox 判断是不是在操作英雄
Cocos2d-x by Example Beginner's Guide,第3章 在GameLayer.ccp中 GameLayer::ccTouchBegan()中 for (int p = 0; p < 2; p++) { player = (GameSprite *) _players->objectAtIndex(p); if (player->boundingBox().c
2013-11-15 14:10:46 1433
原创 需要重载 CCPoint类 的 == 吗?
在 cocos2d-2.1rc0-x-2.1.3\cocos2dx\cocoa\CCGeometry.cpp中 bool CCPoint::equals(const CCPoint& target) const { return (fabs(this->x - target.x) < FLT_EPSILON) && (fabs(this->y - target.y) <
2013-11-15 10:53:18 868
翻译 cocos2d-x中的 实例化与内存管理
在 cocos2d-x by example beginner's guide,第2章,P23页中(翻译请凑合看) There is no Automatic Reference Counting (ARC) in cocos2d-x, so Objective-C developers who have forgotten memory management might have a pro
2013-11-13 13:52:44 829
原创 Director类与Caches
在cocos2d-x example beginner's guide Ch2,P19中(翻译凑合看) The director and caches Then comes the all-knowing CCDirector and all-encompassing cache objects. CCDirector manages scenes and knows all a
2013-11-12 17:59:03 721
原创 cocos2d-x 中的 CCSprite
3个容器 1.CCScene 2.CCLayer 3.CCSprite 先看看作者怎么说CCSprite的 在P18:(翻译请凑合看) These contain your images and will be added to CCLayer derived containers. To my mind this is the most important class in all
2013-11-12 17:22:31 920
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人