Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit 60d6511

Browse files
committed
tutorial
1 parent 0abe049 commit 60d6511

File tree

5 files changed

+62
-0
lines changed

5 files changed

+62
-0
lines changed

assets/img/map/tutorial1.png

-306 Bytes
Binary file not shown.

assets/img/map/tutorial2.png

-286 Bytes
Binary file not shown.

src/logic/ingame/mod.rs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,48 @@ impl InGameScreen {
9898
}
9999
fish.render(context_2d, &mut game_core.resources);
100100
}
101+
context_2d.draw_texture_pro(
102+
&game_core.resources.tut1,
103+
Rectangle {
104+
x: 0.0,
105+
y: 0.0,
106+
width: 44.0,
107+
height: 41.0,
108+
},
109+
Rectangle {
110+
x: 110.0,
111+
y: 100.0,
112+
width: 44.0,
113+
height: 41.0,
114+
},
115+
Vector2 {
116+
x: 0.0,
117+
y: 0.0,
118+
},
119+
0.0,
120+
Color::WHITE,
121+
);
122+
context_2d.draw_texture_pro(
123+
&game_core.resources.tut2,
124+
Rectangle {
125+
x: 0.0,
126+
y: 0.0,
127+
width: 44.0,
128+
height: 41.0,
129+
},
130+
Rectangle {
131+
x: 160.0,
132+
y: 110.0,
133+
width: 44.0,
134+
height: 41.0,
135+
},
136+
Vector2 {
137+
x: 0.0,
138+
y: 0.0,
139+
},
140+
0.0,
141+
Color::WHITE,
142+
);
101143

102144
// Render the world texture
103145
context_2d.draw_texture_rec(

src/logic/shop/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ impl Screen for ShopScreen {
3737
audio_system.play_sound(&game_core.resources.song_shop);
3838
}
3939

40+
draw_handle.draw_text(
41+
&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"),
42+
10,
43+
50,
44+
20,
45+
Color::WHITE,
46+
);
47+
4048
// Window dimensions
4149
let win_height = draw_handle.get_screen_height();
4250
let win_width = draw_handle.get_screen_width();

src/resources.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ pub struct GlobalResources {
5858
pub flippers_one: Texture2D,
5959
pub flippers_two: Texture2D,
6060
pub flippers_three: Texture2D,
61+
62+
// tut
63+
pub tut1: Texture2D,
64+
pub tut2: Texture2D,
6165

6266
// Treasure
6367
pub transponder: FrameAnimationWrapper,
@@ -253,6 +257,14 @@ impl GlobalResources {
253257
&thread,
254258
&Image::load_image("./assets/img/items/flippers3.png")?,
255259
)?),
260+
tut1: (raylib.load_texture_from_image(
261+
&thread,
262+
&Image::load_image("./assets/img/map/tut1.png")?,
263+
)?),
264+
tut2: (raylib.load_texture_from_image(
265+
&thread,
266+
&Image::load_image("./assets/img/map/tut2.png")?,
267+
)?),
256268
transponder: FrameAnimationWrapper::new(
257269
raylib.load_texture_from_image(
258270
&thread,

0 commit comments

Comments
 (0)