#[non_exhaustive]pub struct Guide;Expand description
A guide that provides hints to the player during the tutorial.
Implementations§
Source§impl Guide
impl Guide
Sourcepub fn hint<T: GuideTopic>(&self, topic: T) -> !
pub fn hint<T: GuideTopic>(&self, topic: T) -> !
Provides a hint about the specified topic and exits the program.
Examples found in repository?
examples/tutorial_new_game.rs (line 27)
15fn user_main(mut tick: Tick, starting_resources: StartingResources) -> (Tick, Bundle<Copper, 4>) {
16 tick.log(true);
17
18 let StartingResources {
19 iron,
20 mut iron_territory,
21 mut copper_territory,
22 guide,
23 } = starting_resources;
24
25 // To start, run the game using `rustorio play tutorial` (or whatever this save is called), and follow the hint.
26 // If you get stuck, try giving the guide other objects you've found, like the `tick` object.
27 guide.hint(iron)
28}Auto Trait Implementations§
impl Freeze for Guide
impl RefUnwindSafe for Guide
impl Send for Guide
impl Sync for Guide
impl Unpin for Guide
impl UnwindSafe for Guide
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more