-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.java
More file actions
30 lines (28 loc) · 1 KB
/
Copy pathGame.java
File metadata and controls
30 lines (28 loc) · 1 KB
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
30
import java.awt.*;
import javax.swing.*;
public class Game {
public String name;
public String path;
public String imagePath;
public ImageIcon image;
public ImageIcon backGround;
public String Explain;
public String Tutorial;
public Game(String name,String path,String imagePath,String backPath,String Exp,String tu){
this.name=name;
this.path=path;
this.imagePath=imagePath;
this.image=new ImageIcon(imagePath);
this.backGround = new ImageIcon(backPath);
if (image.getImageLoadStatus() != MediaTracker.COMPLETE) {
System.err.println("アイコンの読み込みに失敗しました: " + imagePath);
image = new ImageIcon();
}
if (backGround.getImageLoadStatus() != MediaTracker.COMPLETE) {
System.err.println("アイコンの読み込みに失敗しました: " + backPath);
backGround = new ImageIcon();
}
this.Explain=Exp;
this.Tutorial = tu;
}
}