Added ui and text
This commit is contained in:
20
web/game.js
20
web/game.js
@@ -70,7 +70,6 @@ function setup() {
|
|||||||
createCanvas(width, height);
|
createCanvas(width, height);
|
||||||
frameRate(framerate);
|
frameRate(framerate);
|
||||||
angleMode(DEGREES);
|
angleMode(DEGREES);
|
||||||
|
|
||||||
// disable the outline of shapes
|
// disable the outline of shapes
|
||||||
Movementloop()
|
Movementloop()
|
||||||
noStroke();
|
noStroke();
|
||||||
@@ -477,10 +476,27 @@ function homescreen() {
|
|||||||
stroke(255, 0, 0)
|
stroke(255, 0, 0)
|
||||||
strokeWeight(5)
|
strokeWeight(5)
|
||||||
fill(0, 255, 0, 0)
|
fill(0, 255, 0, 0)
|
||||||
rect(100, 150, 300, 400, 20, 20, 20, 20)
|
rect(100, 150, 300, 400)
|
||||||
pop()
|
pop()
|
||||||
|
|
||||||
|
push()
|
||||||
|
textSize(50)
|
||||||
|
fill(255, 0, 0)
|
||||||
|
text("Highscores", 250, 200)
|
||||||
|
pop()
|
||||||
|
|
||||||
|
push()
|
||||||
|
stroke(255, 0, 0)
|
||||||
|
strokeWeight(5)
|
||||||
|
fill(0, 255, 0, 0)
|
||||||
|
rect(860, 150, 300, 400)
|
||||||
|
pop()
|
||||||
|
|
||||||
|
push()
|
||||||
|
textSize(50)
|
||||||
|
fill(255, 0, 0)
|
||||||
|
text("Controls", 1000, 200)
|
||||||
|
pop()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user