From abefdf3870821cbb38dee66d2526b0e94c85366a Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 5 Dec 2023 15:48:55 +0100 Subject: [PATCH] Started creation startscreen --- web/game.js | 2 ++ web/js/homescreen.js | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 web/js/homescreen.js diff --git a/web/game.js b/web/game.js index 8939190..7592018 100644 --- a/web/game.js +++ b/web/game.js @@ -48,6 +48,7 @@ let y5; let bulletAmount = 10; +let Startscreen = new Startscreen(width, height); //let myBullet = new bullet(); // the function setup() is called once when the page is loaded @@ -61,6 +62,7 @@ function setup() { // disable the outline of shapes Movementloop() noStroke(); + } function score() { diff --git a/web/js/homescreen.js b/web/js/homescreen.js new file mode 100644 index 0000000..39f1137 --- /dev/null +++ b/web/js/homescreen.js @@ -0,0 +1,23 @@ +class Startscreen { + constructor(width, height) { + this.width = width; + this.height = height; + + } + + setup() { + createCanvas(this.width, this.height); + + } + + + draw() { + circle(100, 100, 100) + } + + update() { + + } + + +} \ No newline at end of file