-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame_object.java
59 lines (49 loc) · 974 Bytes
/
game_object.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
package cmdmario_project;
public class Game_object {
private int xPos, yPos;
private boolean canMove, isSolid;
private char skin = ' ';
//Leeres transparentes GameObject
public Game_object() {
super();
this.isSolid = false;
this.setSkin(' ');
}
//GameObject mit grafischer Darstellung
public Game_object(char skin) {
super();
this.skin = skin;
this.setSolid(true);
this.setCanMove(false);
}
public int getxPos() {
return xPos;
}
public void setxPos(int xPos) {
this.xPos = xPos;
}
public int getyPos() {
return yPos;
}
public void setyPos(int yPos) {
this.yPos = yPos;
}
public boolean isCanMove() {
return canMove;
}
public void setCanMove(boolean canMove) {
this.canMove = canMove;
}
public boolean isSolid() {
return isSolid;
}
public void setSolid(boolean isSolid) {
this.isSolid = isSolid;
}
public char getSkin() {
return skin;
}
public void setSkin(char skin) {
this.skin = skin;
}
}