/**
* FileName : ActionsTest.java
* Comment : 반복과 무한반복
* @version : 1.0
* @author : coolsharp
* @date : 2011. 10. 18.
*/
static class ActionRotateToRepeat extends ActionDemo {
public void onEnter() {
super.onEnter();
centerSprites(2);
// 1초동안 90도로 회전
// 1초동안 0도로 회전
CCRotateTo act1 = CCRotateTo.action(1, 90);
CCRotateTo act2 = CCRotateTo.action(1, 0);
CCSequence seq = CCSequence.actions(act1, act2);
// 무한반복
CCRepeatForever rep1 = CCRepeatForever.action(seq);
// 10회만 반하고 끝남
CCRepeat rep2 = CCRepeat.action(seq.copy(), 10);
tamara.runAction(rep1);
kathia.runAction(rep2);
}
* FileName : ActionsTest.java
* Comment : 반복과 무한반복
* @version : 1.0
* @author : coolsharp
* @date : 2011. 10. 18.
*/
static class ActionRotateToRepeat extends ActionDemo {
public void onEnter() {
super.onEnter();
centerSprites(2);
// 1초동안 90도로 회전
// 1초동안 0도로 회전
CCRotateTo act1 = CCRotateTo.action(1, 90);
CCRotateTo act2 = CCRotateTo.action(1, 0);
CCSequence seq = CCSequence.actions(act1, act2);
// 무한반복
CCRepeatForever rep1 = CCRepeatForever.action(seq);
// 10회만 반하고 끝남
CCRepeat rep2 = CCRepeat.action(seq.copy(), 10);
tamara.runAction(rep1);
kathia.runAction(rep2);
}