Directly execute scripts if script boxes have a non-empty script field

Instead of using gamestates, just directly use the 'script' attribute of
a script box if it is non-empty.

This is accomplished by having to return the index of the block that the
player collides with, so callers can inspect the 'script' attribute of
the block themselves, and do their logic accordingly.
This commit is contained in:
Misa
2020-07-09 23:20:03 -07:00
committed by Ethan Lee
parent ca9e4c8f6e
commit 2506127a17
3 changed files with 23 additions and 7 deletions

View File

@@ -105,7 +105,7 @@ public:
void settemprect(int t);
int checktrigger();
int checktrigger(int* block_idx);
int checkactivity();