eventing will be slightly harder
This commit is contained in:
@@ -31,15 +31,6 @@ impl Component for Geometry {
|
||||
type Storage = VecStorage<Self>;
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Render {
|
||||
pub vertices: Vec<VertexTypeContainer>,
|
||||
}
|
||||
|
||||
impl Component for Render {
|
||||
type Storage = VecStorage<Self>;
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Textures {
|
||||
pub textures: Vec<Arc<CanvasTextureHandle>>,
|
||||
@@ -63,7 +54,6 @@ pub struct RenderSystem;
|
||||
|
||||
impl<'a> System<'a> for RenderSystem {
|
||||
type SystemData = (
|
||||
WriteStorage<'a, Render>,
|
||||
WriteStorage<'a, Position>,
|
||||
WriteStorage<'a, Geometry>,
|
||||
WriteStorage<'a, Textures>,
|
||||
@@ -73,7 +63,6 @@ impl<'a> System<'a> for RenderSystem {
|
||||
);
|
||||
|
||||
fn run(&mut self, (
|
||||
mut vertices_list,
|
||||
mut pos_list,
|
||||
mut geom_list,
|
||||
mut textures_list,
|
||||
@@ -86,7 +75,7 @@ impl<'a> System<'a> for RenderSystem {
|
||||
// compu_frame.add_with_image_swap(compute_buffer.clone(), compute_kernel.clone(), &compu_sprite1);
|
||||
// compu_frame.add(compute_buffer.clone(), compute_kernel.clone());
|
||||
|
||||
for (vertices, position, geometry, textures) in (&mut vertices_list, &mut pos_list, &mut geom_list, &mut textures_list).join() {
|
||||
for (position, geometry, textures) in (&mut pos_list, &mut geom_list, &mut textures_list).join() {
|
||||
// geom.pos_x += mv.vel_x * state.delta_time;
|
||||
// geom.pos_y += mv.vel_y * state.delta_time;
|
||||
|
||||
@@ -105,7 +94,7 @@ impl<'a> System<'a> for RenderSystem {
|
||||
state.canvas_frame.add(textured_vertices);
|
||||
}
|
||||
|
||||
for (vertices, position, geometry, images) in (&mut vertices_list, &mut pos_list, &mut geom_list, &mut images_list).join() {
|
||||
for (position, geometry, images) in (&mut pos_list, &mut geom_list, &mut images_list).join() {
|
||||
// geom.pos_x += mv.vel_x * state.delta_time;
|
||||
// geom.pos_y += mv.vel_y * state.delta_time;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user