forked from mcyapan/CSCI205Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPathTile.java
More file actions
38 lines (31 loc) · 1.65 KB
/
PathTile.java
File metadata and controls
38 lines (31 loc) · 1.65 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
31
32
33
34
35
36
37
38
import java.awt.*;
public class PathTile extends DrawingObject {
private Color dirtColor = new Color(155, 118, 83);
private Color particleColor = new Color(125, 98, 63);
private Square dirt = new Square(0, 0, 48, dirtColor, false);
private Circle particle1 = new Circle(6, 5, 3, particleColor, false);
private Circle particle2 = new Circle(24, 15, 3, particleColor, false);
private Circle particle3 = new Circle(37, 9, 3, particleColor, false);
private Circle particle4 = new Circle(10, 21, 3, particleColor, false);
private Circle particle5 = new Circle(21, 26, 3, particleColor, false);
private Circle particle6 = new Circle(42, 18, 3, particleColor, false);
private Circle particle7 = new Circle(7, 39, 3, particleColor, false);
private Circle particle8 = new Circle(27, 35, 3, particleColor, false);
private Circle particle9 = new Circle(35, 41, 3, particleColor, false);
public PathTile() {
super(false); // Assuming no collision for path
createTile();
}
private void createTile() {
addTile(dirt.getShape(), dirt.getColor());
addTile(particle1.getShape(), particle1.getColor());
addTile(particle2.getShape(), particle2.getColor());
addTile(particle3.getShape(), particle3.getColor());
addTile(particle4.getShape(), particle4.getColor());
addTile(particle5.getShape(), particle5.getColor());
addTile(particle6.getShape(), particle6.getColor());
addTile(particle7.getShape(), particle7.getColor());
addTile(particle8.getShape(), particle8.getColor());
addTile(particle9.getShape(), particle9.getColor());
}
}