/** * Instantiates a new star. * * @param toRight IN THIS CASE TO RIGHT ARE PIXELS NOT 1 TO 100 * @param toEdge SAME * @param a is the Color of the star */ public Star(int toRight, int toEdge, Color a) { this.toRight = toRight; // IN THIS CASE TO RIGHT ARE PIXELS NOT 1 TO 100 this.toEdge = toEdge; // SAME count = 0; setStarColor(a); image = null; }
/** * Instantiates a new star. * * @param toRight IN THIS CASE TO RIGHT ARE PIXELS NOT 1 TO 100 * @param toEdge SAME */ public Star(int toRight, int toEdge) { this.toRight = toRight; // IN THIS CASE TO RIGHT ARE PIXELS NOT 1 TO 100 this.toEdge = toEdge; // SAME count = 0; image = null; setStarColor(colors[(int) (Math.random() * colors.length)]); }
/** Fade. */ public void fade() { if (!(count % (Alien.DELAY * 2) == 0)) return; switch (count / 10 % 10) { case 0: break; case 1: setStarColor(getStarColor().brighter()); break; case 2: break; case 3: setStarColor(getStarColor().brighter()); case 4: break; case 5: setStarColor(getStarColor().brighter()); case 6: break; case 7: setStarColor(getStarColor().darker()); } }