/**
* FileName : ActionsTest.java
* Comment : CCOrbitCamera
* @version : 1.0
* @author : coolsharp
* @date : 2011. 10. 18.
*/
static class ActionOrbit extends ActionDemo {
public void onEnter() {
super.onEnter();
centerSprites(3);
// actionWithDuration:2
// radius:1 deltaRadius:0 angleZ:0 deltaAngleZ:180 angleX:0
// deltaAngleX:0];
CCOrbitCamera orbit1 = CCOrbitCamera.action(2, 1, 0, 0, 180, 0, 0);
CCSequence action1 = CCSequence.actions(orbit1, orbit1.reverse());
CCOrbitCamera orbit2 = CCOrbitCamera.action(2, 1, 0, 0, 180, -45, 0);
CCSequence action2 = CCSequence.actions(orbit2, orbit2.reverse());
CCOrbitCamera orbit3 = CCOrbitCamera.action(2, 1, 0, 0, 180, 90, 0);
CCSequence action3 = CCSequence.actions(orbit3, orbit3.reverse());
kathia.runAction(CCRepeatForever.action(action1));
tamara.runAction(CCRepeatForever.action(action2));
grossini.runAction(CCRepeatForever.action(action3));
CCMoveBy move = CCMoveBy.action(3, CGPoint.ccp(100, -100));
CCMoveBy move_back = move.reverse();
CCSequence seq = CCSequence.actions(move, move_back);
CCRepeatForever rfe = CCRepeatForever.action(seq);
kathia.runAction(rfe);
tamara.runAction(rfe.copy());
grossini.runAction(rfe.copy());
}
public String title() {
return "OrbitCamera action";
}
}
* FileName : ActionsTest.java
* Comment : CCOrbitCamera
* @version : 1.0
* @author : coolsharp
* @date : 2011. 10. 18.
*/
static class ActionOrbit extends ActionDemo {
public void onEnter() {
super.onEnter();
centerSprites(3);
// actionWithDuration:2
// radius:1 deltaRadius:0 angleZ:0 deltaAngleZ:180 angleX:0
// deltaAngleX:0];
CCOrbitCamera orbit1 = CCOrbitCamera.action(2, 1, 0, 0, 180, 0, 0);
CCSequence action1 = CCSequence.actions(orbit1, orbit1.reverse());
CCOrbitCamera orbit2 = CCOrbitCamera.action(2, 1, 0, 0, 180, -45, 0);
CCSequence action2 = CCSequence.actions(orbit2, orbit2.reverse());
CCOrbitCamera orbit3 = CCOrbitCamera.action(2, 1, 0, 0, 180, 90, 0);
CCSequence action3 = CCSequence.actions(orbit3, orbit3.reverse());
kathia.runAction(CCRepeatForever.action(action1));
tamara.runAction(CCRepeatForever.action(action2));
grossini.runAction(CCRepeatForever.action(action3));
CCMoveBy move = CCMoveBy.action(3, CGPoint.ccp(100, -100));
CCMoveBy move_back = move.reverse();
CCSequence seq = CCSequence.actions(move, move_back);
CCRepeatForever rfe = CCRepeatForever.action(seq);
kathia.runAction(rfe);
tamara.runAction(rfe.copy());
grossini.runAction(rfe.copy());
}
public String title() {
return "OrbitCamera action";
}
}