我正在使用 registerEntityModifier 移动船精灵,我的船精灵正在发射导弹正在发射导弹
我的代码如下
公共无效followPath(路径pPath){
thisObject.registerEntityModifier(new LoopEntityModifier(new PathModifier(50, pPath, null, new IPathModifierListener() {
@Override
public void onPathStarted(final PathModifier pPathModifier, final IEntity pEntity) {
}
@Override
public void onPathWaypointStarted(final PathModifier pPathModifier, final IEntity pEntity, final int pWaypointIndex) {
switch(pWaypointIndex) {
case 0:
thisObject.animate(new long[]{200, 200, 200}, 12,14, true);
break;
case 1:
thisObject.animate(new long[]{200, 200, 200}, 12, 14, true);
break;
/* case 2:
thisObject.animate(new long[]{200, 200, 200}, 9, 11, true);
break;
case 3:
thisObject.animate(new long[]{200, 200, 200}, 3, 5, true);
break;*/
}
}
@Override
public void onPathWaypointFinished(final PathModifier pPathModifier, final IEntity pEntity, final int pWaypointIndex) {
}
@Override
public void onPathFinished(final PathModifier pPathModifier, final IEntity pEntity) {
}
})));
}