bg = new ImageIcon("res\\mario_pokemon.jpeg").getImage();
marioIcon = new ImageIcon("res\\Smb1_mario.png").getImage();
hammerIcon = new ImageIcon("res\\33px-Smb1_hammer.png").getImage();
fireballIcon = new ImageIcon("res\\Smb1_bowser_flamef.png").getImage();
mario = new Sprite(w, g);
mario.setImage(marioIcon);
marioPoint.setX(w.getSize().width / 2 - mario.center().X());
marioPoint.setY(w.getSize().height / 2 - mario.center().Y());
mario.setPosition(marioPoint);
mario.setAlive(true);
for(int n = 0; n < FIREBALLS; n++) {
fireball[n] = new Sprite(w, g);
fireball[n].setImage(fireballIcon);
fireballPoint[n] = new MyPoint2D(0, 0);
fireballVel[n] = new MyPoint2D(0.3, 0.3);
fireball[n].setPosition(fireballPoint[n]);
fireball[n].setAlive(false);
}
for(int n = 0; n < ENEMIES; n++) {
hammer[n] = new Sprite(w, g);
hammer[n].setImage(hammerIcon);
hammer[n].setRotationRate(rand.nextInt(5) + 1);
hammerPoint[n] = new MyPoint2D((double)rand.nextInt(w.getSize().width) - 20, (double)rand.nextInt(w.getSize().height) - 20);
hammer[n].setPosition(hammerPoint[n]);
hammer[n].setMoveAngle(rand.nextInt(360));