Crate engine_macros

source ·

Attribute Macros

  • Implements GameObject and Camera to an object. Marks an object to be able to be used as a camera and automatically adds a camera field which holds the mode and zoom.
  • Implements GameObject on a struct and automaically adds the fields transform, appearance, id and layer to update from and to. Also adds 2 functions. Update and Sync. Update updates the object from the layer system and sync syncs the object to the layer. Those functions panic when the object isn’t initialized to the layer yet.