forked from udohi/GameArena
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMoon.java
48 lines (42 loc) · 755 Bytes
/
Moon.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
/**
* This class extends the Sun class.
*
* The Moon class is literally the Sun class but is white.
*
* @see Sun
*
* @author Adam Bogg, Harry Almond
*/
public class Moon extends Sun
{
private Ball cresent;
public Moon()
{
super("WHITE");
}
private static Boolean sunMoving = true;
public static Boolean getSM()
{
return sunMoving;
}
public static void setSM(Boolean in)
{
sunMoving = in;
}
public void moonBoolArcMove()
{
if (!getSM())
{
setXPosition(getXPosition() + getSpeed());
setYPosition(getYPosition() - ySpeed);
ySpeed = ySpeed - 0.0014;
if (getXPosition() > 1380)
{
ySpeed = firstYSpeed;
setXPosition(-100);
setYPosition(720);
setSM(true);
}
}
}
}