html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!--
Please Check some things,
If you lose or not on red bar
If you win or not
If all buttons are working or not
-->
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<script src="https://code.jquery.com/jquery-3.1.1.js"></script>
</head>
<body>
<img src="https://keys4coins.b-cdn.net/wp-content/uploads/2017/07/PUB-2-800x450.jpg" class="back"/>
<img src="https://images-na.ssl-images-amazon.com/images/I/61DOLqH1UkL.png" id="p" width="200px" height="200px" />
<div class="button"><button id="left"><<</button>
<button id="right" >>></button></div>
<button id="fire">🔫</button>
<img src="http://pngimg.com/uploads/bullets/bullets_PNG35621.png" width="30px" height="30px" id="bu"/>
<img src="http://pngimg.com/uploads/target/target_PNG65.png" width="50px" height="50px" id="aim"/>
<img src="https://i.dlpng.com/static/png/1032661_preview.png" width="200px" height="80px" id="foe"/>
<div id="hp"></div>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
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
body {
padding:0;
margin:0;
background-color:black;
}
.back{
transform:rotate(90deg);
width:600px;
height:400px;
z-index:-1;
padding:0;
margin:0;
position:absolute;
top:100px;
right:-100px;
bottom:0px;
}
#p{
transform:rotate(90deg);
position:relative;
top:0px;
}
#left{
width:50px;
height:50px;
border-radius:50%;
transform:rotate(90deg);
Enter to Rename, Shift+Enter to Preview
js
js
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
window.onload=function(){
var player=document.getElementById("p");
var width=390;
var bool=false;
var play=0;
var left=0;
var foeleft=220;
var l=document.getElementById("left");
var bu=document.getElementById("bu");
var aim=document.getElementById("aim")
l.onclick=function(){
play-=10;
player.style.top=play+'px';
aim.style.top=play+70+'px';
bu.style.left=0+'px';
bu.style.opacity=0.0;
}
var r=document.getElementById("right");
r.onclick=function(){
play+=10;
player.style.top=play+'px';
aim.style.top=play+70+'px';
bu.style.left=0+'px';
bu.style.opacity=0.0;
}
var shoot=document.getElementById("fire");
function flow(){
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run