示例#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);
 }