Compare commits
No commits in common. "a5e0b2d32a98bf458dba99317a26d6bc93fc6f42" and "a54213887310be1faec9d5c57cb6e86a4e5e012e" have entirely different histories.
a5e0b2d32a
...
a542138873
BIN
Render.class
BIN
Render.class
Binary file not shown.
@ -4,8 +4,8 @@ comment0.text=\r\n\ Klasse\ render.\r\n\ \ \r\n\ @author\ \r\n
|
|||||||
comment1.params=game
|
comment1.params=game
|
||||||
comment1.target=Render(Game)
|
comment1.target=Render(Game)
|
||||||
comment1.text=---------------Konstruktor---
|
comment1.text=---------------Konstruktor---
|
||||||
comment2.params=x\ y\ r\ g\ b\ visible
|
comment2.params=x\ y\ r\ g\ b
|
||||||
comment2.target=void\ drawGhost(int,\ int,\ int,\ int,\ int,\ boolean)
|
comment2.target=void\ drawGhost(int,\ int,\ int,\ int,\ int)
|
||||||
comment3.params=x\ y\ open
|
comment3.params=x\ y\ open
|
||||||
comment3.target=void\ drawPacman(int,\ int,\ boolean)
|
comment3.target=void\ drawPacman(int,\ int,\ boolean)
|
||||||
numComments=4
|
numComments=4
|
||||||
|
|||||||
15
Render.java
15
Render.java
@ -16,25 +16,16 @@ public class Render {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void drawGhost(int x, int y, int r, int g, int b, boolean visible){
|
public void drawGhost(int x, int y, int r, int g, int b){
|
||||||
game.fill(255);
|
|
||||||
if(visible){
|
|
||||||
game.circle(x,y,game.cellSize*0.8f);
|
|
||||||
game.rect(x-game.cellSize*0.4f, y-game.cellSize*0.4f, game.cellSize*0.8f,game.cellSize*0.8f);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public void drawPacman(int x, int y, boolean open){
|
public void drawPacman(int x, int y, boolean open){
|
||||||
game.fill(255,255,0);
|
game.fill(255,255,0);
|
||||||
|
|
||||||
if(open){
|
if(open){
|
||||||
game.arc(x,y,game.cellSize*0.8f,game.cellSize*0.8f, game.radians(45),game.radians(315));
|
|
||||||
game.fill(0);
|
|
||||||
game.circle(x-5,y-5,game.cellSize*0.15f);
|
|
||||||
}else{
|
}else{
|
||||||
game.circle(x, y, game.cellSize*0.8f);
|
game.circle(x, y, game.cellSize*0.8f);
|
||||||
game.fill(0);
|
|
||||||
game.circle(x-5,y-5,game.cellSize*0.15f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user