IT FUCKING WORKS
This commit is contained in:
parent
7d26d56132
commit
0c4196fbca
13
src/main.rs
13
src/main.rs
|
@ -10,7 +10,12 @@ fn main() {
|
||||||
let mut i2 = 0u8;
|
let mut i2 = 0u8;
|
||||||
|
|
||||||
let sleep = thread::sleep;
|
let sleep = thread::sleep;
|
||||||
|
thread::spawn(move || {
|
||||||
|
Command::new("play")
|
||||||
|
.arg("./sound.mp3")
|
||||||
|
.output()
|
||||||
|
.expect("fucked up");
|
||||||
|
});
|
||||||
game.run(|ctx| {
|
game.run(|ctx| {
|
||||||
|
|
||||||
let mut s = Sprite::new(sprite1, 250, 150).unwrap();
|
let mut s = Sprite::new(sprite1, 250, 150).unwrap();
|
||||||
|
@ -19,6 +24,7 @@ fn main() {
|
||||||
|
|
||||||
|
|
||||||
sleep(time::Duration::from_millis(500));
|
sleep(time::Duration::from_millis(500));
|
||||||
|
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
i = 255;
|
i = 255;
|
||||||
i2 = 255u8;
|
i2 = 255u8;
|
||||||
|
@ -46,10 +52,7 @@ fn main() {
|
||||||
s.draw(ctx).unwrap();
|
s.draw(ctx).unwrap();
|
||||||
s1.draw(ctx).unwrap();
|
s1.draw(ctx).unwrap();
|
||||||
s2.draw(ctx).unwrap();
|
s2.draw(ctx).unwrap();
|
||||||
Command::new("play")
|
|
||||||
.arg("./sound.mp3")
|
|
||||||
.output()
|
|
||||||
.expect("fucked up");
|
|
||||||
}).unwrap();
|
}).unwrap();
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue