cocos2d for andorid - 지치지 않는 무한 반복

/**
* FileName : ActionsTest.java
* Comment : 지지지 않는 무한 반복
* @version : 1.0
* @author : coolsharp
* @date : 2011. 10. 18.
*/
static class ActionRepeatForever extends ActionDemo {
    public void onEnter() {
        super.onEnter();
 
        centerSprites(1);
 
        // 1초 딜레이 후 콜백 호출
        CCSequence action = CCSequence.actions(CCDelayTime.action(1), CCCallFuncN.action(this, "repeatForever"));
 
        grossini.runAction(action);
    }
 
    /**
    * Comment : 무한 반복
    * @version : 1.0
    * @tags : @param sender
    * @date : 2011. 10. 18.
    */
    public void repeatForever(Object sender) {
        // 1초동안 360동 회전 무한 반복
        CCRepeatForever repeat = CCRepeatForever.action(CCRotateBy.action(1.0f, 360));
 
        ((CCNode) sender).runAction(repeat);
    }
 
    public String title() {
        return "CallFuncN + RepeatForever";
    }
}

댓글

이 블로그의 인기 게시물

ViewPager offscreenPageLimit 메모리 상태

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

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