This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JIGPlatform.java
executable file
·73 lines (66 loc) · 1.96 KB
/
JIGPlatform.java
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import java.awt.*;
import java.io.*;
import javax.imageio.*;
public class JIGPlatform extends JIGObject
{
boolean textured;
boolean shown;
Image[] textures;
Color fillcolor;
Color outlinecolor;
public JIGPlatform()
{
textures = new Image[5];
height = 0.0;
baseheight = 0.0;
posDX = 0.0;
posDY = 0.0;
rotDT = 0.0;
textured = false;
shown = true;
fillcolor = Color.gray;
outlinecolor = Color.gray;
}
public JIGPlatform(double baseI,double heightI,Color fillcolorI,Color outlinecolorI)
{
JIGPlatform p = new JIGPlatform();
baseheight = baseI;
height = heightI;
fillcolor = fillcolorI;
outlinecolor = outlinecolorI;
textured = false;
}
public JIGPlatform(double baseI,double heightI,Color fillcolorI,Color outlinecolorI,double posDXi, double posDYi, double rotDTi)
{
JIGPlatform p = new JIGPlatform();
baseheight = baseI;
height = heightI;
fillcolor = fillcolorI;
outlinecolor = outlinecolorI;
textured = false;
posDX = posDXi;
posDY = posDYi;
rotDT = rotDTi;
}
public void setTextures(String tF, String tL, String tB, String tR, String tT)
{
textures = new Image[5];
try {
textures[0] = ImageIO.read(new File(tF));
textures[1] = ImageIO.read(new File(tL));
textures[2] = ImageIO.read(new File(tB));
textures[3] = ImageIO.read(new File(tR));
textures[4] = ImageIO.read(new File(tT));
} catch(java.io.IOException e) {
System.out.println("ERR @ JIGPlatform.setTextures() :: " + e);
}
}
public double getBaseHeight()
{
return baseheight;
}
public void setBaseHeight(double bhI)
{
baseheight = bhI;
}
}