its 6 am
This commit is contained in:
parent
b31b8ba5d7
commit
7fb465c82e
43 changed files with 159 additions and 86 deletions
|
@ -1,9 +1,15 @@
|
|||
function c_moveunit(targetunit, destination) {
|
||||
var theguy = c_gettile(targetunit.pos.x, targetunit.pos.y);
|
||||
log(theguy.contents);
|
||||
if targetunit.alignment == ARMY.US {
|
||||
var theguy = c_gettile(targetunit.returnpos.x, targetunit.returnpos.y);
|
||||
} else {
|
||||
var theguy = c_gettile(targetunit.pos.x, targetunit.pos.y);
|
||||
}
|
||||
//log(theguy.contents);
|
||||
/*if !*/array_remove(theguy.contents, targetunit) //idhfnjg();
|
||||
//theguy.contents = [];
|
||||
//destination.contents = [];
|
||||
array_push(destination.contents, targetunit);
|
||||
targetunit.pos.x = destination.x;
|
||||
targetunit.pos.y = destination.y;
|
||||
theguy.event(targetunit);
|
||||
destination.event(targetunit);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue