我的Cocos2d-x学习笔记(十八)CCGridAction

前端之家收集整理的这篇文章主要介绍了我的Cocos2d-x学习笔记(十八)CCGridAction前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

CCGridAction实现一些格子动作效果。继承关系如下:


实例:

	CCSprite * spr = CCSprite::create("HelloWorld.png");
	spr->setPosition(ccp(200,200));
	addChild(spr);
	//GridAction
	//CCFlipX3D * action = CCFlipX3D::create(2);
	//CCFlipY3D * action = CCFlipY3D::create(2);
	//CCLens3D * action = CCLens3D::create(2,CCSize(20,20),ccp(240,160),100);
	//CCLiquid * action = CCLiquid::create(4,20,35);
	//CCPageTurn3D * action = CCPageTurn3D::create(2,20));
	//CCRipple3D * action = CCRipple3D::create(2,40,30);
	//CCShaky3D * action = CCShaky3D::create(2,false);
	//CCTwirl * action = CCTwirl::create(2,3,30);
	//CCWaves * action = CCWaves::create(2,30,false,true);
	//CCWaves3D * action = CCWaves3D::create(2,30);
	//TiledGrid3D
	//CCFadeOutTRTiles * action = CCFadeOutTRTiles::create(2,20));
	//CCFadeOutBLTiles * action = CCFadeOutBLTiles::create(2,20));
	//CCJumpTiles3D * action = CCJumpTiles3D::create(2,CCSize(4,4),20);
	//CCShakyTiles3D * action = CCShakyTiles3D::create(2,false);
	//CCShatteredTiles3D * action = CCShatteredTiles3D::create(2,false);
	//CCShuffleTiles * action = CCShuffleTiles::create(2,2);
	//CCSplitCols * action = CCSplitCols::create(2,20);
	//CCSplitRows * action = CCSplitRows::create(2,20);
	//CCTurnOffTiles * action = CCTurnOffTiles::create(2,20));
	CCWavesTiles3D * action = CCWavesTiles3D::create(2,30);
	spr->runAction(action);
原文链接:https://www.f2er.com/cocos2dx/342803.html

猜你在找的Cocos2d-x相关文章