Enum nitro::component::Message [] [src]

pub enum Message {
    Start {
        key: i32,
    },
    Update {
        delta_time: f32,
    },
    OnDestroy,
    OnDetach,
    UserMessage(Box<Any>),
}

Variants

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

Sent to Components every frame, delta_time is the time elapsed since last frame in seconds.

Fields of Update

Sent to all components on a GameObject prior to the GameObject being destroyed.

Sent when this component is removed from the GameObject.

Whatever you want it to be! You can send and receive this message type as much as you like, Nitro will never send these.