forked from Java-Game-Maker/JavaGameEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGround.java
More file actions
35 lines (27 loc) · 860 Bytes
/
Copy pathGround.java
File metadata and controls
35 lines (27 loc) · 860 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
package Testing;
import javagameengine.components.colliders.SquareCollider;
import javagameengine.components.GameObject;
import javagameengine.msc.Vector2;
public class Ground extends GameObject {
public Ground() {
setScale(new Vector2(600,64));
setPosition(new Vector2(300,500));
SquareCollider s = new SquareCollider();
s.setVisible(true);
s.setLocalPosition(new Vector2(0,0));
addChild(s);
}
public Ground(Vector2 pos) {
setScale(new Vector2(600,64));
setPosition(pos);
SquareCollider s = new SquareCollider();
s.setVisible(true);
s.setLocalPosition(new Vector2(0,0));
addChild(s);
}
@Override
public void update() {
super.update();
//Debug.log(getParent().toString());
}
}