Example #1
0
 @Override
 protected void loadDefaults() {
   super.loadDefaults();
   orientation = Types.RIGHT.copy();
   draw_arrow = true;
   is_oriented = true;
 }
Example #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;
    }
  }
Example #3
0
 @Override
 public void copyTo(VGDLSprite target) {
   OrientedAvatar targetSprite = (OrientedAvatar) target;
   super.copyTo(targetSprite);
 }