Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * At level 2 an alien ship appears a few seconds into the level. It follows
- * a zig-zag path, periodically firing bullets in random directions. When it
- * is destroyed, you earn 200 points. A few seconds later, it appears again.
- */
- private void placeAlien() {
- Participant.expire(this.alien);
- if (this.level > 1) {
- int alienShipSize = this.level == 2 ? 1 : 0;
- this.alien = new Alien(alienShipSize, this);
- this.alien
- .setPosition(0.0D, 750.0D * Constants.RANDOM.nextDouble());
- this.alien.setVelocity(5 - alienShipSize,
- Constants.RANDOM.nextInt(2) * 3.141592653589793D);
- addParticipant(this.alien);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement