diff --git a/index.html b/index.html index a77026a..32b679c 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,13 @@ +
+
+
+Loading... +
+
+
Pause
@@ -98,5 +105,10 @@ var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions) + diff --git a/main.css b/main.css index 076590d..6beeea7 100644 --- a/main.css +++ b/main.css @@ -10,8 +10,9 @@ padding: 0; -ms-user-select: none; user-select: none; font-family: "Londrina Solid"; -box-sizing: border-box; -webkit-box-sizing: border-box; +-moz-box-sizing: border-box; +box-sizing: border-box; } html { height: 100%; @@ -31,6 +32,91 @@ vertical-align: middle; overflow: hidden; cursor: url(assets/cursor.png) 4 4, auto; } +#loading { +background-color: #aaa; +color: rgba(0, 0, 0, 0.5); +text-align: center; +z-index: 9990; +position: absolute; +top: 0; +bottom: 0; +left: 0; +right: 0; +backface-visibility: hidden; +} +#loadingc { +position: absolute; +top: 50%; +left: 50%; +z-index: 9999; +margin: -50px 0 0 -100px; +height: 100px; +width: 200px; +font-size: 20px; +} + +@keyframes loading { + from { + -webkit-transform: rotate(0deg); + } + to { + -webkit-transform: rotate(360deg); + } +} +@-moz-keyframes loading { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} +@-webkit-keyframes loading { + from { + -webkit-transform: rotate(0deg); + } + to { + -webkit-transform: rotate(360deg); + } +} +@-ms-keyframes loading { + from { + -webkit-transform: rotate(0deg); + } + to { + -webkit-transform: rotate(360deg); + } +} +@-o-keyframes loading { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} +.loading { + width: 20px; + height: 20px; + margin-right: 0px; + background-color: rgba(0, 0, 0, 0.5); + border-radius: 10px; + border-top-right-radius: 0px; + -webkit-border-radius: 10px; + -webkit-border-top-right-radius: 0px; + -moz-border-radius: 10px; + -moz-border-top-right-radius: 0px; + -o-border-radius: 10px; + -o-border-top-right-radius: 0px; + -ms-border-radius: 10px; + -ms-border-top-right-radius: 0px; + animation: loading 1s infinite; + -webkit-animation: loading 1s infinite; + -moz-animation: loading 1s infinite; + -o-animation: loading 1s infinite; + -ms-animation: loading 1s infinite; + display: inline-block; +} #map_canvas { width: 100%; height: 100%; @@ -230,8 +316,8 @@ height: 175px; position: absolute; top: 0px; left: 0px; -margin-top: 0px; -margin-left: 0px; +margin-top: -82.5px; +margin-left: -50px; background: url(assets/eknife.png); background-size: 100% 100%; z-index: 1; diff --git a/main.js b/main.js index d47d8cb..47acb66 100644 --- a/main.js +++ b/main.js @@ -15,25 +15,43 @@ weapon: 0 }; var evil=[]; +function spawnevil() { +newevil=$('
'); +where=Math.floor(Math.random()+0.5); +if (where==0) { +top=0; +left=Math.floor(Math.random()*window.innerWidth+0.5); +} +else if (where==1) { +left=0; +top=Math.floor(Math.random()*window.innerHeight+0.5); +} +else { +alert("A bug has occured!"); +} +newevil.css("left", left+"px"); +newevil.css("top", top+"px"); +} + function angle(x, y, bx, by) { return Math.atan2(bx-x, by-y)/Math.PI*-180; } function dpf() { map.panBy(0, -step); -player.x-=step; +player.x -= step; } function dpb() { map.panBy(0, step); -player.x+=step; +player.x += step; } function dpl() { map.panBy(-step, 0); -player.y-=step; +player.y -= step; } function dpr() { map.panBy(step, 0); -player.y+=step; +player.y += step; } window.addEventListener('load', function(e) {