/**
* FileName : RemoveTest.java
* Comment : Move 콜백 객체 배우자
* @version : 1.0
* @author : coolsharp
* @date : 2011. 10. 18.
*/
public class RemoveTest extends com.coolsharp.test.game.ActionManager.ActionManagerDemo {    public RemoveTest() {        super();
 
        // 이동 객체 생성
        CCMoveBy move = CCMoveBy.action(5, CGPoint.ccp(200, 0));
 
        // 콜백 객체 생성
        CCCallFunc callback = CCCallFunc.action(this, "stopAction");
 
        // 시퀀스 액션 등록(이동 객체를 콜백으로 등록)
        CCSequence sequence = CCSequence.actions(move, callback);
        // 시퀀스 객체를 나중에 찾아 써야 하므로 이름표 지정
        sequence.setTag(com.coolsharp.test.coolsharp_cocos2d_test_Activity.kTagSequence);
 
        CCSprite child = CCSprite.sprite("grossini.png");        child.setPosition(CGPoint.ccp(200, 200));
        this.addChild(child, 1, com.coolsharp.test.coolsharp_cocos2d_test_Activity.kTagGrossini);
 
        // 시퀀스 액션 시작
        child.runAction(sequence);
    }
 
    public void stopAction() {        Log.i("coolsharp", "SA");//        CCNode sprite = getChildByTag(com.coolsharp.test.coolsharp_cocos2d_test_Activity.kTagGrossini);
//        sprite.stopAction(com.coolsharp.test.coolsharp_cocos2d_test_Activity.kTagSequence);
    }
 
    public String title() {        return "Remove Test";
    }
 
    public String subtitle() {        return "Should not crash. Testing issue #841";
    }
댓글
댓글 쓰기