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);
|
|
|
|
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-22 17:10:15 +00:00
|
|
|
theguy.event();
|
2022-08-16 22:28:01 +00:00
|
|
|
}
|