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.

28 lines
699 B

2 years ago
  1. package gameobjects;
  2. import java.awt.Color;
  3. import java.util.LinkedList;
  4. import collider.*;
  5. import playground.Playground;
  6. import rendering.*;
  7. public class FallingStar extends GameObject {
  8. private Color color = Color.WHITE;
  9. protected double rad = -1;
  10. public FallingStar(String id, Playground playground, double x, double y, double vx, double vy,
  11. Color color, double rad) {
  12. super(id, playground, x, y, vx, vy);
  13. this.rad = rad;
  14. this.color = color;
  15. LinkedList<Collider> cols = new LinkedList<Collider>();
  16. CircleCollider cc = new CircleCollider("cc", this, rad);
  17. cols.add(cc);
  18. setColliders(cols);
  19. this.artist = new CircleArtist(this, rad, color);
  20. }
  21. }