2022-08-16 22:28:01 +00:00
|
|
|
function c_moveunit(targetunit, destination) {
|
2022-08-22 17:10:15 +00:00
|
|
|
var theguy = c_gettile(targetunit.pos.x, targetunit.pos.y);
|
2022-08-23 06:49:38 +00:00
|
|
|
log(theguy.contents);
|
2022-08-23 08:34:45 +00:00
|
|
|
/*if !*/array_remove(theguy.contents, targetunit) //idhfnjg();
|
2022-08-16 22:28:01 +00:00
|
|
|
array_push(destination.contents, targetunit);
|
|
|
|
targetunit.pos.x = destination.x;
|
|
|
|
targetunit.pos.y = destination.y;
|
2022-08-23 09:25:43 +00:00
|
|
|
theguy.event(targetunit);
|
2022-08-16 22:28:01 +00:00
|
|
|
}
|