fireboy watergirl moment
This commit is contained in:
parent
961b455c40
commit
1b890d73eb
16
src/main.rs
16
src/main.rs
|
@ -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);
|
||||
|
|
Reference in New Issue