TintBy, TintTo
색상과 관련된 Action인데 RGB 색상을 빼거나 합치는 느낌이다. 정확히는 더 공부해봐야 알듯..
<원본>
<TintBy적용>
bool HelloWorld::init() { ////////////////////////////// // 1. super init first if ( !Layer::init() ) { return false; } Size visibleSize = Director::getInstance()->getVisibleSize(); Vec2 origin = Director::getInstance()->getVisibleOrigin(); mySprite = Sprite::create("HelloWorld.png"); mySprite->setPosition(Vec2(visibleSize.width/2 + origin.x, visibleSize.height/2 + origin.y)); this->addChild(mySprite); //추가할 내용 auto action = TintBy::create(3, 0, -255, 0); mySprite->runAction(action); return true; }
'Cocos2D-X' 카테고리의 다른 글
간단하게 데이터 저장 - UserDefault 사용법 (0) | 2016.06.15 |
---|---|
회전(RotateBy, RotateTo) (0) | 2016.05.09 |
스케일(ScaleBy, ScaleTo) (0) | 2016.05.09 |
어떤 지점에 놓음(Place) (0) | 2016.05.09 |
3차 베지어곡선(BezierBy, BezierTo) (0) | 2016.05.08 |