tutorial
This commit is contained in:
parent
0abe049061
commit
60d6511035
Binary file not shown.
Before Width: | Height: | Size: 306 B |
Binary file not shown.
Before Width: | Height: | Size: 286 B |
@ -98,6 +98,48 @@ impl InGameScreen {
|
|||||||
}
|
}
|
||||||
fish.render(context_2d, &mut game_core.resources);
|
fish.render(context_2d, &mut game_core.resources);
|
||||||
}
|
}
|
||||||
|
context_2d.draw_texture_pro(
|
||||||
|
&game_core.resources.tut1,
|
||||||
|
Rectangle {
|
||||||
|
x: 0.0,
|
||||||
|
y: 0.0,
|
||||||
|
width: 44.0,
|
||||||
|
height: 41.0,
|
||||||
|
},
|
||||||
|
Rectangle {
|
||||||
|
x: 110.0,
|
||||||
|
y: 100.0,
|
||||||
|
width: 44.0,
|
||||||
|
height: 41.0,
|
||||||
|
},
|
||||||
|
Vector2 {
|
||||||
|
x: 0.0,
|
||||||
|
y: 0.0,
|
||||||
|
},
|
||||||
|
0.0,
|
||||||
|
Color::WHITE,
|
||||||
|
);
|
||||||
|
context_2d.draw_texture_pro(
|
||||||
|
&game_core.resources.tut2,
|
||||||
|
Rectangle {
|
||||||
|
x: 0.0,
|
||||||
|
y: 0.0,
|
||||||
|
width: 44.0,
|
||||||
|
height: 41.0,
|
||||||
|
},
|
||||||
|
Rectangle {
|
||||||
|
x: 160.0,
|
||||||
|
y: 110.0,
|
||||||
|
width: 44.0,
|
||||||
|
height: 41.0,
|
||||||
|
},
|
||||||
|
Vector2 {
|
||||||
|
x: 0.0,
|
||||||
|
y: 0.0,
|
||||||
|
},
|
||||||
|
0.0,
|
||||||
|
Color::WHITE,
|
||||||
|
);
|
||||||
|
|
||||||
// Render the world texture
|
// Render the world texture
|
||||||
context_2d.draw_texture_rec(
|
context_2d.draw_texture_rec(
|
||||||
|
@ -37,6 +37,14 @@ impl Screen for ShopScreen {
|
|||||||
audio_system.play_sound(&game_core.resources.song_shop);
|
audio_system.play_sound(&game_core.resources.song_shop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
draw_handle.draw_text(
|
||||||
|
&format!("you really need to get to the bottom huh?\n Well then buy my wares,\n they will help you get to your doo-hicky"),
|
||||||
|
10,
|
||||||
|
50,
|
||||||
|
20,
|
||||||
|
Color::WHITE,
|
||||||
|
);
|
||||||
|
|
||||||
// Window dimensions
|
// Window dimensions
|
||||||
let win_height = draw_handle.get_screen_height();
|
let win_height = draw_handle.get_screen_height();
|
||||||
let win_width = draw_handle.get_screen_width();
|
let win_width = draw_handle.get_screen_width();
|
||||||
|
@ -58,6 +58,10 @@ pub struct GlobalResources {
|
|||||||
pub flippers_one: Texture2D,
|
pub flippers_one: Texture2D,
|
||||||
pub flippers_two: Texture2D,
|
pub flippers_two: Texture2D,
|
||||||
pub flippers_three: Texture2D,
|
pub flippers_three: Texture2D,
|
||||||
|
|
||||||
|
// tut
|
||||||
|
pub tut1: Texture2D,
|
||||||
|
pub tut2: Texture2D,
|
||||||
|
|
||||||
// Treasure
|
// Treasure
|
||||||
pub transponder: FrameAnimationWrapper,
|
pub transponder: FrameAnimationWrapper,
|
||||||
@ -253,6 +257,14 @@ impl GlobalResources {
|
|||||||
&thread,
|
&thread,
|
||||||
&Image::load_image("./assets/img/items/flippers3.png")?,
|
&Image::load_image("./assets/img/items/flippers3.png")?,
|
||||||
)?),
|
)?),
|
||||||
|
tut1: (raylib.load_texture_from_image(
|
||||||
|
&thread,
|
||||||
|
&Image::load_image("./assets/img/map/tut1.png")?,
|
||||||
|
)?),
|
||||||
|
tut2: (raylib.load_texture_from_image(
|
||||||
|
&thread,
|
||||||
|
&Image::load_image("./assets/img/map/tut2.png")?,
|
||||||
|
)?),
|
||||||
transponder: FrameAnimationWrapper::new(
|
transponder: FrameAnimationWrapper::new(
|
||||||
raylib.load_texture_from_image(
|
raylib.load_texture_from_image(
|
||||||
&thread,
|
&thread,
|
||||||
|
Reference in New Issue
Block a user