8 lines
287 B
Plaintext
8 lines
287 B
Plaintext
function c_moveunit(targetunit, destination) {
|
|
var theguy = c_gettile(targetunit.pos.x, targetunit.pos.y);
|
|
array_remove(theguy.contents, targetunit);
|
|
array_push(destination.contents, targetunit);
|
|
targetunit.pos.x = destination.x;
|
|
targetunit.pos.y = destination.y;
|
|
theguy.event();
|
|
} |