-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCharacter.java
More file actions
45 lines (33 loc) · 786 Bytes
/
Character.java
File metadata and controls
45 lines (33 loc) · 786 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
import java.awt.*;
//Speedy the Tortoise
//Flipper the Dolphin
//Cuddles the Shark? <-- haha
public class Character {
private int x;
private int y;
private int r;
private int dx;
private int dy;
private int health;
private int speed;
//private int lives;
//private int score;
//private int eat;
private boolean up;
private boolean down;
private boolean left;
private boolean right;
public Player() {
x = GamePanel.HEIGHT / 2;
y = GamePanel.WIDTH / 2;
r = 10;
dx = 0;
dy = 0;
health = 100;
speed = 10;
//lives, score, eat?
}
public void update() {
if(left) {
}
}