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.

34 lines
822 B

  1. package gameobjects;
  2. import java.awt.Color;
  3. import collider.*;
  4. import java.awt.Graphics2D;
  5. import java.awt.image.BufferedImage;
  6. import java.io.File;
  7. import java.io.IOException;
  8. import java.util.LinkedList;
  9. import javax.imageio.ImageIO;
  10. import collider.Collider;
  11. import controller.ObjectController;
  12. import playground.Playground;
  13. import rendering.*;
  14. public class EgoObject extends GameObject {
  15. double egoRad = 0;
  16. public EgoObject(String id, Playground pg, double x, double y, double vx, double vy,
  17. double egoRad) {
  18. super(id, pg, x, y, vx, vy);
  19. this.egoRad = egoRad;
  20. this.artist = new CircleArtist(this, egoRad, Color.WHITE);
  21. }
  22. public GameObject generateColliders() {
  23. CircleCollider coll = new CircleCollider("coll", this, this.egoRad);
  24. this.addCollider(coll);
  25. return this;
  26. }
  27. }