Rengy Script · Base
Screen
Write : Screen after the name to get the hooks below as well as every script's own.
component Example : Screen {
fn on_create() {
}
} On this page
Its own hooks fire only on a node that carries a ScreenNotifier. Without one, they are declared and never run.
Hooks
fn on_create() every base
Runs once, on the first step the node exists.
fn on_destroy() every base
Runs once, as destroy or destroy_self removes the node. Nodes under it go with it without hearing it.
fn on_position_change(old_position: Vec2, new_position: Vec2) every base
Runs when the node moves in the world.
fn on_visibility_change(is_visible: bool) every base
Runs when the node is shown or hidden.
fn on_signal() every base
Runs on a step when a signal has reached this node; read it with heard.
fn loop(dt: f32) every base
Runs every simulation step while the node exists.
fn on_screen_enter()
Runs when the node's notifier rectangle comes into the camera's view.
fn on_screen_exit()
Runs when the node's notifier rectangle leaves the camera's view.