You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
587 B

  1. package gameobjects;
  2. import java.awt.Color;
  3. import collider.*;
  4. import playground.Playground;
  5. import rendering.*;
  6. public class EgoObject extends GameObject {
  7. double egoRad = 0;
  8. public EgoObject(String id, Playground pg, double x, double y, double vx, double vy,
  9. double egoRad) {
  10. super(id, pg, x, y, vx, vy);
  11. this.egoRad = egoRad;
  12. this.artist = new CircleArtist(this, egoRad, Color.WHITE);
  13. }
  14. public GameObject generateColliders() {
  15. CircleCollider coll = new CircleCollider("coll", this, this.egoRad);
  16. this.addCollider(coll);
  17. return this;
  18. }
  19. }