bevy_scriptum/assets/examples/call_function_from_rust.rhai
2023-06-21 16:22:12 +02:00

13 lines
246 B
Text

let my_state = #{
iterations: 0,
};
fn on_update() {
my_state.iterations += 1;
print("on_update called " + my_state.iterations + " times");
if (my_state.iterations >= 10) {
print("calling quit");
quit();
}
}