-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGravity.java
More file actions
54 lines (45 loc) · 988 Bytes
/
Copy pathGravity.java
File metadata and controls
54 lines (45 loc) · 988 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* Write a description of class Gravity here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Gravity extends MoveableObject
{
boolean gravity, hit;
public Gravity(int xx, int yy,int aa,int bb,int xdir,int ydir, boolean Gravity)
{
super(xx,yy,aa,bb,xdir,ydir);
gravity = Gravity;
hit=false;
}
public Gravity(int xx, int yy,int aa,int bb,boolean Gravity)
{
super(xx,yy,aa,bb);
gravity = Gravity;
hit=false;
}
public void setGravity(boolean Gravity)
{
gravity = Gravity;
}
public boolean getGravity()
{
return gravity;
}
public void setHit(boolean Hit)
{
hit=Hit;
}
public boolean getHit()
{
return hit;
}
public void walls(String S1)
{
if(S1=="Y,0")
ydir=2;
if(S1=="Y,600")
ydir=-2;
}
}