map events and title screen

This commit is contained in:
the me 2022-08-22 10:10:15 -07:00
parent ff3ea9dcdf
commit 8e30d7fa7e
37 changed files with 730 additions and 17 deletions

View file

@ -1,7 +1,8 @@
function c_moveunit(targetunit, destination) {
array_remove(c_gettile(targetunit.pos.x, targetunit.pos.y).contents, targetunit);
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();
}