We currently need scripts to be defined either as individual files (my_script_file.cpp) or as embedded lambdas/script expressions (SCRIPT_BEGIN, SCRIPT_END, on(...), etc.), but this isn't always the most natural way to define a script.
We should extend the macro API (found in engine:script's embedded_script.hpp file) to allow script definitions outside of the body of the current script.
We currently need scripts to be defined either as individual files (
my_script_file.cpp
) or as embedded lambdas/script expressions (SCRIPT_BEGIN
,SCRIPT_END
,on(...)
, etc.), but this isn't always the most natural way to define a script.We should extend the macro API (found in
engine:script
'sembedded_script.hpp
file) to allow script definitions outside of the body of the current script.This would look something like:
We could also optionally have a
SCRIPT_CLASS
macro to allow for extensions similar to the header-based approach._NOTE:
SCRIPT_CLASS
may need to be defined above theSCRIPT(my_custom_script)
section._