Trait ABC_ECS::Resource

source ·
pub trait Resource: 'static {
    // Required method
    fn as_any(&self) -> &dyn Any;

    // Provided method
    fn update(&mut self) { ... }
}
Expand description

Resources are objects that are not components and do not have any relation to entities They are a sort of blend between an entity and a system, they have their own update method that is called every frame like a system But unlike a system, they can be accessed by systems

Required Methods§

source

fn as_any(&self) -> &dyn Any

This method is needed to allow the resource to be downcast

Provided Methods§

source

fn update(&mut self)

This method is called every frame

Implementors§