cocos2d for android - Tint

/**
* FileName : ActionsTest.java
* Comment : 농도를 변경
* @version : 1.0
* @author : coolsharp
* @date : 2011. 10. 18.
*/
static class ActionTint extends ActionDemo {
    public void onEnter() {
        super.onEnter();
 
        centerSprites(2);
 
        // To는 절대적으로 rgb에 맞는 농도가 변경되고 By는 현재의 값에서 rgb가 추가되어 색상이 변경
        // R값 255, B값 255로 농도 변경 
        CCTintTo action1 = CCTintTo.action(2, ccColor3B.ccc3(255, 0, 255));
        // R값 -127, G값 -255, B값 -127로 농도 변경
        CCTintBy action2 = CCTintBy.action(2, ccColor3B.ccc3(-127, -255, -127));
        // 거꾸로
        CCTintBy action2Back = action2.reverse();
 
        tamara.runAction(action1);
        kathia.runAction(CCSequence.actions(action2, action2Back));
    }
 
    public String title() {
        return "TintTo / TintBy";
    }
}

댓글

이 블로그의 인기 게시물

ViewPager offscreenPageLimit 메모리 상태

eskimo esim 사용기 - 일본 / 오사카(23/08/06 ~ 23/08/08)

ASP에서 C# 언어로 만든 DLL 호출