a bit of a mess? surely not
This commit is contained in:
parent
47cae629df
commit
0ead044da1
14 changed files with 289 additions and 16 deletions
|
@ -41,7 +41,7 @@ function st_moving() {
|
|||
prevremainingmov = remainingmov;
|
||||
c_decolor_all(c_red);
|
||||
c_decolor_all(c_green);
|
||||
var guy = c_gettile(x, y);
|
||||
var guy = c_gettile(x, y, true);
|
||||
if guy != noone {
|
||||
c_colortile(guy.x, guy.y, c_green);
|
||||
switch dir {
|
||||
|
@ -59,7 +59,32 @@ function st_moving() {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if select {
|
||||
var rng = [1];
|
||||
var guy = c_gettile(x, y, true);
|
||||
var hitting = noone;
|
||||
switch dir {
|
||||
case DIR.LEFT:
|
||||
hitting = c_gettile(guy.x-1, guy.y);
|
||||
break;
|
||||
case DIR.DOWN:
|
||||
hitting = c_gettile(guy.x, guy.y+1);
|
||||
break;
|
||||
case DIR.UP:
|
||||
hitting = c_gettile(guy.x, guy.y-1);
|
||||
break;
|
||||
case DIR.RIGHT:
|
||||
hitting = c_gettile(guy.x+1, guy.y);
|
||||
break;
|
||||
}
|
||||
if hitting != noone {
|
||||
|
||||
}
|
||||
}
|
||||
if back {
|
||||
state = st_standing;
|
||||
drawstate = c_null;
|
||||
}
|
||||
/*if x < (pos.x-mov)*ts.x {
|
||||
x = (pos.x-mov)*ts.x;
|
||||
} else if x > (pos.x+mov+1)*ts.x {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue