Skip to content

scripts_system::script

Paweł Waligóra edited this page Apr 16, 2024 · 17 revisions

Full signature: class scripts_system::script

Class is meant to be abstract. Should be overridden. Place your custom classes that inherit from engine::script in namespace game

  • methods
    • scripts_system::script::init() - called during opengl init, use for memory allocation.
    • scripts_system::script::start() - called once just before game loop, use for setup
    • scripts_system::script::update() - called ever iteration of game loop
    • scripts_system::script::free() - called on opengl free, use for freeing memory allocated on game::script::init()

All methods are called by scripts_system::call_events(), after object has been registered with: scripts_system::subscribe(&object). Methods can be registered individually with: scripts_system::subscribe(std::bind(&game::your_script::method, &object).

Home

Git Workflow

Issues

Coding Rules

Skrypty-Tutorial

Useful resources

Game Structure

Code Structure

Clone this wiki locally