-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgame.js
More file actions
35 lines (24 loc) · 715 Bytes
/
game.js
File metadata and controls
35 lines (24 loc) · 715 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
function game(){
// LET VARIABLES
let mainMenu = document.getElementById('main-menu');
let gameBox = document.getElementById('main-game-box');
this.game = function(){
console.log('constructor');
}
// Start Button
this.startGame = function(e){
mainMenu.style.opacity = '0';
var delayInMilliseconds = 800;
setTimeout(function () {
mainMenu.style.display = 'none';
gameBox.style.display = 'block';
runGame();
}, delayInMilliseconds);
}
}
// RUNNING THE GAME
var gs = new gameScript();
function runGame(){
//Shows if the games run
console.log('Game Running');
}