Enum nitro::component::Message
[−]
[src]
pub enum Message { Start { key: i32, }, Update { delta_time: f32, }, OnDestroy, OnDetach, UserMessage(Box<Any>), }
Variants
Start
Sent to Components the instant they are attached to a GameObject.
This will be the Component's only opportunity to know its own key. If you need this please store the key value.
Fields of Start
key: i32 |
Update
Sent to Components every frame, delta_time is the time elapsed since last frame in seconds.
Fields of Update
delta_time: f32 |
OnDestroy
Sent to all components on a GameObject prior to the GameObject being destroyed.
OnDetach
Sent when this component is removed from the GameObject.
UserMessage(Box<Any>)
Whatever you want it to be! You can send and receive this message type as much as you like, Nitro will never send these.