-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
48 lines (40 loc) · 1.4 KB
/
index.html
File metadata and controls
48 lines (40 loc) · 1.4 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
<html>
<head>
<title></title>
<script src="https://simplycodingcourses.com/files/simply.js"></script>
<script>
function start(){
sjs.open("target",1000,600);
// data
localStorage.setItem("score", 0);
localStorage.setItem("targetIncrement", 0);
localStorage.setItem("extraLife", 1);
// floor
var floor = new sjs.Image("Images/floor.png");
floor.bottom();
floor.setSize(1000, 35);
// GITHUB GLITCH: floor doesn't stay on bottom; use this
setTimeout(function(){
floor.bottom();
}, 1);
// title
var title = new sjs.Text("MORTAR", 50, "#003300");
title.center().offset(0, -150);
// desc
var desc = new sjs.Text("Your goal is to hit the targets. Press and hold SPACEBAR to shoot farther. Good luck!", 28, "blue");
desc.center().offset(0, -50);
// author
var author = new sjs.Text("Made by Vancony", 26, "black");
author.bottom().centerH().offset(0, -50);
// play button
var playBtn = new sjs.Button("Play", function(){
window.location = "mortar.html";
});
playBtn.center();
} //end start
</script>
</head>
<body onload="start()">
<div id="target" style="margin:auto;background:lightblue;"></div>
</body>
</html>