Sorry if this is a bit of a newb question.
The game engine I'm writing has an entity system, where a a new entity is created for each folder in a map folder. I have the directories set up like so:
Code:
maps
map
| entity01
| | entity.json
| | init.nut
| | update.nut
| | destroy.nut
Each time an entity is created, the scripts in its folder are compiled, and they run at appropriate times. This all works fine.
The problem I'm having is that obviously the scripts aren't attached to an Squirrel instance of a class, so I can't call member functions. Is there a better way I could be handling this?