Skip to content
This repository was archived by the owner on Apr 27, 2024. It is now read-only.

Commit bedd233

Browse files
committed
Created Credits class
1 parent 45b84e6 commit bedd233

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

js/scenes/credits.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
3+
class Credits{
4+
constructor(canvas,ctx,logo,homeButton){
5+
this.canvas = canvas;
6+
this.logo = logo;
7+
this.show = false;
8+
this.programmerCredit = new ImageClass(ctx,100,300,700,100,"img/ui/credits/programmer.png");
9+
this.gameArtCredit = new ImageClass(ctx,100,380,700,100,"img/ui/credits/gameart.png");
10+
this.leftArrowButton = new Button(ctx,600,500,150,100,"img/ui/buttons/leftArrowButton.png");
11+
}
12+
get draw(){
13+
this.reDraw();
14+
}
15+
reDraw(){
16+
this.logo.x = this.canvas.width/2 - (this.logo.w / 2);
17+
this.logo.draw;
18+
this.gameArtCredit.draw;
19+
this.programmerCredit.draw;
20+
this.leftArrowButton.draw;
21+
}
22+
}

0 commit comments

Comments
 (0)