Update direction

master
orphevs 2017-12-08 23:34:23 +01:00
parent 5fb9189eac
commit bbac68a1ea
2 changed files with 3 additions and 1 deletions

View File

@ -20,7 +20,7 @@ body{
.map{ .map{
width: 1170px; width: 1170px;
height: 460px; height: 460px;
border: solid 3px red; border: solid 3px #000;
background: url(../img/bg_sand.png) repeat; background: url(../img/bg_sand.png) repeat;
position: absolute; position: absolute;
left: 0; left: 0;
@ -45,6 +45,7 @@ body{
position: absolute; position: absolute;
left: 50px; left: 50px;
top: 100px; top: 100px;
display: none;
} }
.bullet{ .bullet{

View File

@ -23,6 +23,7 @@ function checkKey(){
if(keyPressed == tank1_key_up || keyPressed == tank1_key_down || keyPressed == tank1_key_left || keyPressed == tank1_key_right){ if(keyPressed == tank1_key_up || keyPressed == tank1_key_down || keyPressed == tank1_key_left || keyPressed == tank1_key_right){
tank1_checkDirection(); tank1_checkDirection();
tank1_changeDirection(); tank1_changeDirection();
tank1_changePosition();
} }
function tank1_checkDirection(){ function tank1_checkDirection(){