use scone::components::Renderable; use scone_ecs::system::System; use crate::components::{ErrorComponent, ExampleComponent}; pub struct ExampleSystem {} impl System<::Event> for ExampleSystem { fn tick( &self, entities: &mut Vec, _resources: &mut Vec>, _events: &Vec< saunter::event::Event<::Event>, >, _dt: f32, ) -> Result<(), scone_ecs::EcsError> { for entity in entities { let mut val = 0.0; if let Ok(component) = entity.get_component_mut::() { log::info!("value is {}", component.val); component.val = 1 - component.val; val = component.val as f32; } let renderable = entity.get_component_mut::()?; renderable.test = val; let _ = entity.get_component::()?; } Ok(()) } }