Created
November 29, 2016 01:29
-
-
Save icefoxen/607d40278267f51b59a832f00e00c5c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn draw(&mut self, ctx: &mut Context) -> GameResult<()> { | |
ctx.renderer.clear(); | |
let world = self.planner.mut_world(); | |
let positions = world.read::<CPosition>(); | |
let playermarkers = world.read::<CPlayer>(); | |
let images = world.read::<CImage>(); | |
for (pos, player, image) in (&positions, &playermarkers, &images).iter() { | |
println!("Position is: {:?}, {:?}, {:?}", pos, player, image); | |
let kiwi = self.assets.images.get_mut(image.0); | |
graphics::draw(ctx, kiwi.unwrap(), None, None)?; | |
} | |
ctx.renderer.present(); | |
timer::sleep_until_next_frame(ctx, 60); | |
Ok(()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment