-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTrouNoir.java
More file actions
29 lines (26 loc) · 815 Bytes
/
TrouNoir.java
File metadata and controls
29 lines (26 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import java.io.*; //image
import javax.imageio.*; //BufferedImage
/**
* \class TrouNoir : classe fille d'ObjetsCelestes gérant les trous noirs
*/
public class TrouNoir extends ObjetsCelestes{
/**
* \fn TrouNoir(FenetreJeu f) : constructeur TrouNoir
*
* @param FenetreJeu f : objet désignant la fenêtre principale de jeu
*/
public TrouNoir(FenetreJeu f) throws IOException{
super(f);
image = ImageIO.read(new File("images/trouNoir.png"));
}
/**
* \fn void action() : méthode lançant l'animation de contact entre trou noir et rover
*/
public void action(){
try{
f.toucheTrouNoir = true; //le booléen gérant le contact trou noir dans la fenêtre jeu devient true
new TrouNoirAnimation(f); //lancement de l'animation trou noir
}catch(IOException Exception){
}
}
}