You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnmain(){letmut engine = World::new();// Add an Entity and Components:let entities_and_components = &mut engine.entities_and_components;let entity = entities_and_components.add_entity();// Add components like Position and Velocity;
entities_and_components.add_component_to(entity,Position{x:0.0,y:0.0});
entities_and_components.add_component_to(entity,Velocity{x:1.0,y:1.0});// or you can do it all in one step:let entity = entities_and_components
.add_entity_with((Position{x:0.0,y:0.0},Velocity{x:1.0,y:1.0}));}