FadeIn FadeOut
FadeIn FadeOut 을 사용하여 페이드인,아웃을 조절한다.
페이드인은 노드의 투명도설정을 변경한다.
완전투명->완전불투명으로 동작하고 FadeOut은 반대이다.
C++
auto mySprite = Sprite::create("mysprite.png");
// fades in the sprite in 1 seconds
auto fadeIn = FadeIn::create(1.0f);
mySprite->runAction(fadeIn);
// fades out the sprite in 2 seconds
auto fadeOut = FadeOut::create(2.0f);
mySprite->runAction(fadeOut);
TintTo TintBy
TintTo TintBy 를 사용하여 노드에대한 색채혼합을 한다.
C++
auto mySprite = Sprite::create("mysprite.png");
// Tints a node to the specified RGB values
auto tintTo = TintTo::create(2.0f, 120.0f, 232.0f, 254.0f);
mySprite->runAction(tintTo);
// Tints a node BY the delta of the specified RGB values.
auto tintBy = TintBy::create(2.0f, 120.0f, 232.0f, 254.0f);
mySprite->runAction(tintBy);
출처: <http://dygks910910.tistory.com/14?category=295210>
'Cocos2d-x v3.17 > 기본기능' 카테고리의 다른 글
[Cocos2d-x 기본기능]변속운동 (0) | 2018.08.11 |
---|---|
[Cocos2d-x 기본기능]프레임 애니메이션 (0) | 2018.08.11 |
[Cocos2d-x 기본기능] 이동,회전,스케일 (0) | 2018.08.11 |
[Cocos2d-x 기본기능]Action 소개 및 By 와 To 의 구별 (0) | 2018.08.11 |
[Cocos2d-x 기본기능]다각형 스프라이트 Polygon Sprite (0) | 2018.08.11 |