pub struct Script {
pub file_path: String,
pub initialized: bool,
pub properties: BTreeMap<String, ScriptValue>,
}Expand description
ECS Componenti: Varlığın üzerine hangi Lua script’inin takılı olduğunu tutar
Fields§
§file_path: String§initialized: bool§properties: BTreeMap<String, ScriptValue>Per-entity overrides for the properties this script declares.
Scripts are loaded once per PATH — two entities running the same file share one Lua
environment — so a per-entity value cannot live in that environment. It lives here and is
handed to on_entity_update as its third argument.
A BTreeMap for the same reason the loaded-script map is one: this crate’s contract is
same-platform bit-identical replay, and a HashMap’s iteration order is seeded per process.
Implementations§
Trait Implementations§
Source§impl Component for Script
impl Component for Script
Source§fn storage_type() -> StorageType
fn storage_type() -> StorageType
Where instances of this type are stored; see
StorageType. Read moreSource§impl<'de> Deserialize<'de> for Script
impl<'de> Deserialize<'de> for Script
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Script
impl RefUnwindSafe for Script
impl Send for Script
impl Sync for Script
impl Unpin for Script
impl UnsafeUnpin for Script
impl UnwindSafe for Script
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Bundle for Twhere
T: Component,
impl<T> Bundle for Twhere
T: Component,
Source§fn get_infos() -> Vec<ComponentInfo>
fn get_infos() -> Vec<ComponentInfo>
Runtime metadata for every component this bundle will write, in the order it writes
them. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more