sundowndev 2017-12-09 04:29:15 +01:00
commit a691c6324f
5 changed files with 130 additions and 8 deletions

View File

@ -1,3 +1,8 @@
@font-face{
font-family: 'FIANSO';
src: url('../fonts/prstartk.ttf');
}
body{
margin: 0;
padding: 0;
@ -21,6 +26,98 @@ body{
.container{
max-width: 1140px;
margin: auto;
position: absolute;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
}
.score{
position: absolute;
right: 0px;
top: 0px;
text-align: right;
padding-top: 20px;
padding-right: 20px;
}
.score h3{
font-family: 'FIANSO';
font-size: 32px;
color: #000;
margin: inherit;
padding-bottom: 8px;
}
.score h5{
font-family: 'FIANSO';
font-size: 24px;
color: #000;
margin: inherit;
}
.gameover{
text-align: center;
position: absolute;
width: 100%;
height: 73%;
top: 0;
padding-top: 150px;
background: rgba(155, 0, 0, 0.85);
box-shadow: inset 0px 0px 60px 0px rgba(0,0,0,0.75);
}
.gameover h1{
font-family: 'FIANSO';
font-size: 64px;
color: #fff;
margin: inherit;
padding-bottom: 60px;
animation: pulse 3s infinite;
}
@keyframes pulse{
0%{
transform: scale(1);
}
50%{
transform: scale(1.15);
}
100%{
transform: scale(1);
}
}
.gameover h4{
font-family: 'FIANSO';
font-size: 18px;
color: #fff;
margin: inherit;
padding-bottom: 100px;
opacity: 0.8;
}
.gameover a{
font-family: 'FIANSO';
font-size: 18px;
color: #fff;
margin: inherit;
text-align: center;
border: solid 3px #fff;
border-radius: 6px;
padding: 12px 24px;
text-decoration: none;
transition: 0.3s;
position: relative;
z-index: 5;
}
.gameover a:hover{
background: #fff;
color: #000;
}
.map{
@ -29,6 +126,7 @@ body{
display: inline-block;
padding-top: 7px;
padding-bottom: 3px;
overflow: hidden;
}
.line{
@ -51,6 +149,18 @@ body{
animation: cibleBroken 0.3s 3;
}
<<<<<<< Updated upstream
=======
.cible{
background: url(../img/bg_cible.png) no-repeat;
}
.cible-touchee{
background: url(../img/bg_cible_broken.png) no-repeat;
animation: cibleBroken 0.3s 3;
}
>>>>>>> Stashed changes
@keyframes cibleBroken{
0%{
opacity: 1;

Binary file not shown.

BIN
assets/fonts/prstartk.ttf Normal file

Binary file not shown.

View File

@ -112,6 +112,7 @@ function move(event) {
}
}
<<<<<<< Updated upstream
setInterval(function(){
console.log('test');
if(bulletX == 0 || bulletY == 0){
@ -192,6 +193,9 @@ setInterval(function(){
grid.style.background = 'url(./assets/img/bg_bullet.png) no-repeat';
grid.style.backgroundPosition = bulletDir;
}, 32.12);
=======
document.addEventListener('keydown', move, false);
>>>>>>> Stashed changes
var ntm = setInterval(function(){
x2 = Math.floor(Math.random() * 11);
@ -223,3 +227,8 @@ var ntm = setInterval(function(){
document.addEventListener('keydown', move, false);
setPosition(x, y, direction);
=======
}, 3000);
>>>>>>> Stashed changes

View File

@ -3,12 +3,6 @@
<meta charset="UTF-8">
<title>de_tank</title>
<link rel="stylesheet" href="./assets/css/style.css">
<style>
.col {
/* border: 1px solid black;*/
}
</style>
</head>
<body>
@ -17,6 +11,15 @@
</section>
<div class="container">
<section class="map">
<div class="score">
<h3>SCORE</h3>
<h5>999</h5>
</div>
<div class="gameover">
<h1>GAME OVER</h1>
<h4>Votre score : 999</h4>
<a href="#">Rejouer</a>
</div>
<div class="line line-1">
<div class="col col-1"></div>
<div class="col col-2"></div>
@ -203,7 +206,7 @@
<div class="col col-7"></div>
<div class="col col-8"></div>
<div class="col col-9"></div>
<div class="col col-10"></div>
<div class="col col-10 cible-touchee"></div>
<div class="col col-11"></div>
<div class="col col-12"></div>
<div class="col col-13"></div>