-
Notifications
You must be signed in to change notification settings - Fork 0
scripts_system::find_script_of_type()
Paweł Waligóra edited this page May 22, 2024
·
2 revisions
Function finds script by its' name and it's type. Returns pointer to a scripts_system::script or it's subclass specified by type parameter. Takes std::string
as argument and a type parameter. Returns nullptr
if no script matched the requirements.
#include "scripts_system.h"
#include "scripts_system.h"
game::player* pl = scripts_system::find_script_of_type<game::player>("player");
if (pl != nullptr) {
// do something with pl
}
for alternative methods of finding game scripts.
- engine
- scripts_system
- scene_loader
- time_system
-
input_system
- input_system::key_held
- input_system::key_events
- input_system::subscribe() (deprecated)
- input_system::axis_state()
- input_system::key_bind
- input_system::axis
- input_system::double_axis
- input_system::triple_axis
- input_system::axis2
- input_system::double_axis2
- input_system::triple_axis2
- input_system::axis-choice
- renderer
- physics
- ui_system
- game