-
Notifications
You must be signed in to change notification settings - Fork 1
/
Arrow.java
60 lines (42 loc) · 1.33 KB
/
Arrow.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
package org.academniadecodigo.dancedance.gameobjects;
import org.academiadecodigo.simplegraphics.pictures.Picture;
import org.academniadecodigo.dancedance.simplegfx.StageSgfx;
/**
* Created by codecadet on 20/10/16.
*/
public class Arrow {
private Picture leftArrow;
private Picture rightArrow;
private Picture upArrow;
private Picture downArrow;
public Arrow() {
leftArrow = new Picture(StageSgfx.PADDING, StageSgfx.PADDING, "resources/art/ARROW_LEFT_.png");
rightArrow = new Picture(StageSgfx.PADDING, StageSgfx.PADDING, "resources/art/ARROW_RIGHT_.png");
upArrow = new Picture(StageSgfx.PADDING, StageSgfx.PADDING, "resources/art/ARROW_UP_.png");
downArrow = new Picture(StageSgfx.PADDING, StageSgfx.PADDING, "resources/art/ARROW_DOWN_.png");
}
public void showLeftArrow() {
leftArrow.draw();
}
public void hideLeftArrow() {
leftArrow.delete();
}
public void showRightArrow() {
rightArrow.draw();
}
public void hideRightArrow() {
rightArrow.delete();
}
public void showUpArrow() {
upArrow.draw();
}
public void hideUpArrow() {
upArrow.delete();
}
public void showDownArrow() {
downArrow.draw();
}
public void hideDownArrow() {
downArrow.delete();
}
}