SGS_CREATE(LITE)CLASS [function alias]
SGS_CREATECLASS( sgs_Context* C, sgs_Variable* out, class_name, ctor_args )
SGS_CREATELITECLASS( sgs_Context* C, sgs_Variable* out, class_name, ctor_args )
Create a new instance of the specified class, using the specified arguments for constructor.
- If
out
is specified, that variable receives the class, otherwise it is pushed on the stack. - This is the preferred method to create class object instances.
- Returns the pointer to class instance.
Usage example:
SGS_CREATECLASS( C, NULL, myClass, ( param1, 5.0f ) );