AndEngineを使い始めたばかりですが、
私はこのようにスプライトを動かしています:
if(pValueY < 0 && !jumping) {
jumping = true;
// User is currently holding the UP direction
// get the player entity (used to apply entity modifier, and get the current X position
final Entity playerEntity = (Entity) physicsHandler.getEntity();
// set the jump duration, set the starting x position, and how high the jump will be
final float jumpDuration = 8;
final float startX = playerEntity.getX();
final float jumpHeight = 40;
// set the move modifiers and set it as a sequence
final MoveYModifier moveUpModifier = new MoveYModifier(jumpDuration / 2, startX, startX - jumpHeight);
final MoveYModifier moveDownModifier = new MoveYModifier(jumpDuration / 2, startX + jumpHeight, startX);
final SequenceEntityModifier modifier = new SequenceEntityModifier(moveUpModifier, moveDownModifier);
// apply modifier
playerEntity.registerEntityModifier(modifier);
}
else {
// basically if the user presses left or right this should occur
physicsHandler.setVelocityX(pValueX * 10);
distance += pValueX;
}
私の質問は、registerEntityModifier 関数が完了した後にジャンプを false に設定するにはどうすればよいですか? (プレイヤーがジャンプを終えた後)
ありがとう!