diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 0f600b4..348dea7 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -2,30 +2,29 @@ - [Introduction](./introduction.md) - [Runtimes](./runtimes.md) - - [Lua](./lua/lua.md) - - [Installation](./lua/installation.md) - - [Hello World](./lua/hello_world.md) - - [Spawning scripts](./lua/spawning_scripts.md) - - [Calling Rust from Lua](./lua/calling_rust_from_script.md) - - [Calling Lua from Rust](./lua/calling_script_from_rust.md) - - [Interacting with bevy in callbacks](./lua/interacting_with_bevy.md) - - [Builtin types](./lua/builtin_types.md) - - [Builtin variables](./lua/builtin_variables.md) - - [Ruby](./ruby/ruby.md) - - [Installation](./ruby/installation.md) - - [Hello World](./ruby/hello_world.md) - - [Spawning scripts](./ruby/spawning_scripts.md) - - [Calling Rust from Ruby](./ruby/calling_rust_from_script.md) - - [Calling Ruby from Rust](./ruby/calling_script_from_rust.md) - - [Interacting with bevy in callbacks](./ruby/interacting_with_bevy.md) - - [Builtin types](./ruby/builtin_types.md) - - [Builtin variables](./ruby/builtin_variables.md) - - [Rhai](./rhai/rhai.md) - - [Installation](./rhai/installation.md) - - [Hello World(TBD)]() + - [Lua](./lua/lua.md) + - [Installation](./lua/installation.md) + - [Hello World](./lua/hello_world.md) + - [Spawning scripts](./lua/spawning_scripts.md) + - [Calling Rust from Lua](./lua/calling_rust_from_script.md) + - [Calling Lua from Rust](./lua/calling_script_from_rust.md) + - [Interacting with bevy in callbacks](./lua/interacting_with_bevy.md) + - [Builtin types](./lua/builtin_types.md) + - [Builtin variables](./lua/builtin_variables.md) + - [Ruby](./ruby/ruby.md) + - [Installation](./ruby/installation.md) + - [Hello World](./ruby/hello_world.md) + - [Spawning scripts](./ruby/spawning_scripts.md) + - [Calling Rust from Ruby](./ruby/calling_rust_from_script.md) + - [Calling Ruby from Rust](./ruby/calling_script_from_rust.md) + - [Interacting with bevy in callbacks](./ruby/interacting_with_bevy.md) + - [Builtin types](./ruby/builtin_types.md) + - [Rhai](./rhai/rhai.md) + - [Installation](./rhai/installation.md) + - [Hello World(TBD)]() - [Multiple plugins](./multiple_plugins.md) - [Multiple runtimes(TBD)]() - [Implementing custom runtimes(TBD)]() - [Workflow](./workflow/workflow.md) - - [Live-reload](./workflow/live_reload.md) + - [Live-reload](./workflow/live_reload.md) - [Bevy support matrix](./bevy_support_matrix.md) diff --git a/book/src/ruby/builtin_types.md b/book/src/ruby/builtin_types.md index a661888..dd48962 100644 --- a/book/src/ruby/builtin_types.md +++ b/book/src/ruby/builtin_types.md @@ -55,6 +55,8 @@ fn set_translation( ## Bevy::Entity +`Bevy::Entity.current` is currently not available within promise callbacks. + ### Constructor None - instances can only be acquired by using `Bevy::Entity.current` diff --git a/book/src/ruby/builtin_variables.md b/book/src/ruby/builtin_variables.md index 2896ecf..a857bfe 100644 --- a/book/src/ruby/builtin_variables.md +++ b/book/src/ruby/builtin_variables.md @@ -1,13 +1 @@ # Builtin variables - -## entity - -Current entity that the script is atteched to can be retrieved by calling `Bevy::Entity.current`. -It exposes `index` method that returns bevy entity index. -It is useful for accessing entity's components from scripts. -It can be used in the following way: -```ruby -puts("Current entity index: #{Bevy::Entity.current.index}") -``` - -`Bevy::Entity.current` variable is currently not available within promise callbacks.