{"size": 496, "ext": "js", "max_stars_repo_path": "src/bullet-hell-js/js/Entity/Player/Bullet.js", "max_stars_repo_name": "jjayeon/icy-puzzles", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/bullet-hell-js/js/Entity/Player/Bullet.js", "max_issues_repo_name": "jjayeon/icy-puzzles", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/bullet-hell-js/js/Entity/Player/Bullet.js", "max_forks_repo_name": "jjayeon/icy-puzzles", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.0769230769, "max_line_length": 61, "alphanum_fraction": 0.5524193548}
import Entity from "../Entity.js";

class Bullet extends Entity {
  constructor(canvas, player, img) {
    const x = player.x + player.width;
    const y = player.y + player.height / 2;
    super(
      canvas,
      { last: x, p: x, v: 2 }, // xvals
      { last: y, p: y, v: 2 }, // yvals
      20,
      20,
      img
    );

    this._player = player;
  }

  update(delta) {
    super.update(delta);
    this._yvals.p = this._player.y + this._player.height / 2;
  }
}

export default Bullet;
