-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTarget.java
More file actions
31 lines (20 loc) · 740 Bytes
/
Copy pathTarget.java
File metadata and controls
31 lines (20 loc) · 740 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
30
31
public class Target extends Avoid {
public static final String TARGET_IMAGE_FILE = "game_assets/Targs.gif";
public static final int TARGET_WIDTH = 75;
public static final int TARGET_HEIGHT = 75;
public static final int TARGET_DEFAULT_SCROLL_SPEED = 2;
private int scrollSpeed = TARGET_DEFAULT_SCROLL_SPEED;
public Target(){
this(0, 0);
}
public Target(int x, int y){
super(x, y, TARGET_WIDTH, TARGET_HEIGHT, TARGET_IMAGE_FILE);
}
public int getScrollSpeed(){
return this.scrollSpeed;
}
//Sets the scroll speed to the argument amount
public void setScrollSpeed(int newSpeed){
this.scrollSpeed = newSpeed;
}
}