728x90
반응형
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SScc2dx.cpp | |
// http://www.jesusbosch.com/2012/06/creating-and-using-sprite-sheets-in.html | |
_batchNode = CCSpriteBatchNode::batchNodeWithFile("gamePlayPack.pvr");this->addChild(_batchNode); | |
CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("gamePlayPack.plist"); | |
_ship = CCSprite::spriteWithSpriteFrameName( "ufo.png" ); | |
CCSize winSize = CCDirector::sharedDirector()->getWinSize();_ship->setPosition( ccp(winSize.width * 0.1, winSize.height * 0.5) ); | |
_batchNode->addChild( _ship, 1 ); | |
728x90
반응형
'C C++' 카테고리의 다른 글
boost asio tcp block server (0) | 2014.02.18 |
---|---|
C/C++ 오류 발생 전처리기 #error (0) | 2013.03.06 |
Using Spritesheets with Cocos2d-X (0) | 2012.12.07 |
간단한 C++ 오버라이딩(overriding) 예제 (0) | 2012.11.09 |
Qt Polymorphism (0) | 2012.03.06 |