예제 #1
0
 @Override
 protected void loadDefaults() {
   super.loadDefaults();
   orientation = Types.RIGHT.copy();
   draw_arrow = true;
   is_oriented = true;
 }
예제 #2
0
  @Override
  public void update(Game game) {
    Vector2d tmp = orientation.copy();
    orientation = Types.NONE.copy();

    super.update(game);

    Vector2d dir = lastDirection();
    if (0 == dir.x && 0 == dir.y) {
      // No movement.
      orientation = tmp;
    } else {
      // moved, update:
      dir.normalise();
      orientation = dir;
    }
  }
예제 #3
0
 @Override
 public void copyTo(VGDLSprite target) {
   OrientedAvatar targetSprite = (OrientedAvatar) target;
   super.copyTo(targetSprite);
 }