
游戏
xiewenbo
互联网广告行业呆过几年,旅游公司呆过几年,对机器学习,自然语言处理,图像识别,个性化推荐 有兴趣
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
游戏-CCAction
1、动作基本概念 CCAction是动作的基类,所有的动作都派生自此类。CCAction的一个对象就是一个动作,动作或动画只能由CCNode来执行 CCSprite* sp = CCSprite::create("Icon.png");//创建一个精灵 sp->setPosition( ccp(20, 20) );//设置精灵初始位置 this->addChild(sp, 0);//添转载 2013-10-07 21:56:19 · 603 阅读 · 0 评论 -
帧动画和旋转
CCSprite* pSprite = CCSprite::create("scene15_pig01_01.png");pSprite->setPosition(ccp(400,200)); this->addChild(pSprite, 0,3); CCAnimation *animation = CCAnimation::create(); animation->addSprite转载 2013-10-12 22:04:15 · 886 阅读 · 0 评论 -
collision detection
#pragma once #include "cocos2d.h" #include "Box2D/Box2D.h" class MyContact { public: MyContact(void); ~MyContact(void); b2Fixture* fixtureA; b2Fixture* fixtureB; }; class MyContactLis转载 2013-10-14 20:54:08 · 843 阅读 · 0 评论 -
拖拽功能
1. 事件介绍 CCStandardTouchDelegate 默认事件 virtual void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent);处理按下事件 virtual void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent);处理按下并移动事件 virtual void转载 2013-10-14 21:09:10 · 571 阅读 · 0 评论 -
cocos2d-x Cygwin can't find ***** permision denied
在编译cocos2d-x的helloworld 或者 tests的时候。 官网上使用ndk4、ndk5,这里是使用 ndkr7b、ndkr8或ndkr8b 。操作会简单很多,但是出了些小问题也是很坑人的。 下面出现如下编译错误 [javascript] view plaincopy Prebuilt : libgnustl_sta转载 2014-04-02 20:04:10 · 1048 阅读 · 0 评论