fireboy watergirl moment

This commit is contained in:
gallant 2022-05-21 14:01:50 -05:00
parent 961b455c40
commit 1b890d73eb
1 changed files with 6 additions and 10 deletions

View File

@ -41,6 +41,10 @@ fn main() {
}
for key in keys {
let state = match key {
Scancode::Left | Scancode::Right => 0,
_ => 2,
};
let offset = match key {
Scancode::Escape => {
game.terminate();
@ -53,17 +57,9 @@ fn main() {
_ => (0, 0),
};
let mut spriteindex = sprites.get(0).unwrap();
/*
let spriteindex = sprites.get_mut(state).unwrap();
*/
/*pub const fn unwrap(self) -> T {
match self {
Some(val) => val,
None => panic("called `Option::unwrap()` on a `None` value"),
}
}*/
//spriteindex.translate(offset);
spriteindex.translate(offset);
}
ctx.set_background_colour( 129, 201, i);