bevy_scriptum/assets/examples/ruby/call_function_from_rust.rb
Jarosław Konik 53479f94b5
Some checks are pending
Book / test (push) Waiting to run
Deploy book / deploy (push) Waiting to run
Rust / build (push) Waiting to run
Ruby support (#19)
Add support for Ruby language
2025-05-27 19:19:52 +02:00

13 lines
220 B
Ruby

$my_state = {
iterations: 0,
}
def on_update
$my_state[:iterations] += 1
puts("on_update called #{$my_state[:iterations]} times")
if $my_state[:iterations] >= 10
print("calling quit");
quit()
end
end