cocos2d for android - animation

/**
* FileName : ActionsTest.java
* Comment : 애니메이션
* @version : 1.0
* @author : coolsharp
* @date : 2011. 10. 18.
*/
static class ActionAnimate extends ActionDemo {
    public void onEnter() {
        super.onEnter();
 
        centerSprites(1);
 
        // 애니메이션 생성 
        CCAnimation animation = CCAnimation.animation("dance");
        // 그림 로드 하면서 대입
        for (int i = 1; i < 15; i++)
            animation.addFrame(String.format("grossini_dance_%02d.png", i));
 
        // 3초간 애니메이션 진행
        CCAnimate action = CCAnimate.action(3, animation, false);
        CCAnimate action_back = action.reverse();
 
        grossini.runAction(CCSequence.actions(action, action_back));
    }
 
    public String title() {
        return "Animation";
    }
}

댓글

이 블로그의 인기 게시물

ViewPager offscreenPageLimit 메모리 상태

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

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