mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-28 03:35:51 +03:00
deploy: 9fb26eed0a
This commit is contained in:
parent
a7769e3085
commit
687f90672a
@ -1,11 +1,11 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Results` struct in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, Results"><title>experiment::after_level::Results - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Results</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.panel">panel</a><a href="#structfield.unlock_message">unlock_message</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-State%3CSimpleApp%3CSession%3E%3E">State<SimpleApp<Session>></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>after_level</a></p><script>window.sidebarCurrent = {name: 'Results', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Results</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.panel">panel</a><a href="#structfield.unlock_messages">unlock_messages</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-State%3CSimpleApp%3CSession%3E%3E">State<SimpleApp<Session>></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>after_level</a></p><script>window.sidebarCurrent = {name: 'Results', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/after_level.rs.html#17-20' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>after_level</a>::<wbr><a class="struct" href=''>Results</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Results {
|
||||
panel: Panel,
|
||||
unlock_message: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>,
|
||||
unlock_messages: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>,
|
||||
}</pre></div><h2 id='fields' class='fields small-section-header'>
|
||||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</code></span><span id="structfield.unlock_message" class="structfield small-section-header"><a href="#structfield.unlock_message" class="anchor field"></a><code>unlock_message: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../experiment/after_level/struct.Results.html" title="struct experiment::after_level::Results">Results</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/experiment/after_level.rs.html#22-59' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>(<br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>, <br> score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> level: &<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>>></code><a class='srclink' href='../../src/experiment/after_level.rs.html#23-58' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-State%3CSimpleApp%3CSession%3E%3E' class='impl'><code class='in-band'>impl State<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>> for <a class="struct" href="../../experiment/after_level/struct.Results.html" title="struct experiment::after_level::Results">Results</a></code><a href='#impl-State%3CSimpleApp%3CSession%3E%3E' class='anchor'></a><a class='srclink' href='../../src/experiment/after_level.rs.html#61-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.event' class="method hidden"><code>fn <a href='#method.event' class='fnname'>event</a>(<br> &mut self, <br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>><br>) -> Transition<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>></code><a class='srclink' href='../../src/experiment/after_level.rs.html#62-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</code></span><span id="structfield.unlock_messages" class="structfield small-section-header"><a href="#structfield.unlock_messages" class="anchor field"></a><code>unlock_messages: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>></code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../experiment/after_level/struct.Results.html" title="struct experiment::after_level::Results">Results</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/experiment/after_level.rs.html#22-59' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>(<br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>, <br> score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> level: &<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>>></code><a class='srclink' href='../../src/experiment/after_level.rs.html#23-58' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-State%3CSimpleApp%3CSession%3E%3E' class='impl'><code class='in-band'>impl State<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>> for <a class="struct" href="../../experiment/after_level/struct.Results.html" title="struct experiment::after_level::Results">Results</a></code><a href='#impl-State%3CSimpleApp%3CSession%3E%3E' class='anchor'></a><a class='srclink' href='../../src/experiment/after_level.rs.html#61-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.event' class="method hidden"><code>fn <a href='#method.event' class='fnname'>event</a>(<br> &mut self, <br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>><br>) -> Transition<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>></code><a class='srclink' href='../../src/experiment/after_level.rs.html#62-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id='method.draw' class="method hidden"><code>fn <a href='#method.draw' class='fnname'>draw</a>(&self, g: &mut GfxCtx<'_>, _: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>)</code><a class='srclink' href='../../src/experiment/after_level.rs.html#89-91' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div><h4 id='method.draw_baselayer' class="method hidden"><code>fn <a href='#method.draw_baselayer' class='fnname'>draw_baselayer</a>(&self) -> DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id='method.on_destroy' class="method hidden"><code>fn <a href='#method.on_destroy' class='fnname'>on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `main` fn in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, main"><title>experiment::main - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../experiment/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'main', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/experiment/lib.rs.html#20-33' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>experiment</a>::<wbr><a class="fn" href=''>main</a></span></h1><pre class='rust fn'>pub fn main()</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "experiment";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/experiment/lib.rs.html#20-37' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>experiment</a>::<wbr><a class="fn" href=''>main</a></span></h1><pre class='rust fn'>pub fn main()</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "experiment";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `game` mod in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, game"><title>experiment::game - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module game</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'game', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#1-472' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>game</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#1-474' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>game</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table><tr class='module-item'><td><a class="struct" href="struct.EnergylessArrow.html" title='experiment::game::EnergylessArrow struct'>EnergylessArrow</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Game.html" title='experiment::game::Game struct'>Game</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.GameState.html" title='experiment::game::GameState struct'>GameState</a></td><td class='docblock-short'></td></tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
|
||||
<table><tr class='module-item'><td><a class="constant" href="constant.ACQUIRE_BOOST_RATE.html" title='experiment::game::ACQUIRE_BOOST_RATE constant'>ACQUIRE_BOOST_RATE</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="constant" href="constant.BOOST_SPEED_MULTIPLIER.html" title='experiment::game::BOOST_SPEED_MULTIPLIER constant'>BOOST_SPEED_MULTIPLIER</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `experiment` crate."><meta name="keywords" content="rust, rustlang, rust-lang, experiment"><title>experiment - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../experiment/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Crate experiment</p><div class='block version'><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id='all-types' href='all.html'><p>See all experiment's items</p></a><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class='location'></p><script>window.sidebarCurrent = {name: 'experiment', ty: 'mod', relpath: '../'};</script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/experiment/lib.rs.html#1-42' title='goto source code'>[src]</a></span><span class='in-band'>Crate <a class="mod" href=''>experiment</a></span></h1><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/experiment/lib.rs.html#1-46' title='goto source code'>[src]</a></span><span class='in-band'>Crate <a class="mod" href=''>experiment</a></span></h1><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
|
||||
<table><tr class='module-item'><td><a class="mod" href="after_level/index.html" title='experiment::after_level mod'>after_level</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="animation/index.html" title='experiment::animation mod'>animation</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="before_level/index.html" title='experiment::before_level mod'>before_level</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="buildings/index.html" title='experiment::buildings mod'>buildings</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="controls/index.html" title='experiment::controls mod'>controls</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="game/index.html" title='experiment::game mod'>game</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="levels/index.html" title='experiment::levels mod'>levels</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="meters/index.html" title='experiment::meters mod'>meters</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="movement/index.html" title='experiment::movement mod'>movement</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="session/index.html" title='experiment::session mod'>session</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="title/index.html" title='experiment::title mod'>title</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="vehicles/index.html" title='experiment::vehicles mod'>vehicles</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
|
||||
<table><tr class='module-item'><td><a class="fn" href="fn.main.html" title='experiment::main fn'>main</a></td><td class='docblock-short'></td></tr></table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2>
|
||||
<table><tr class='module-item'><td><a class="type" href="type.App.html" title='experiment::App type'>App</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="type" href="type.Transition.html" title='experiment::Transition type'>Transition</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "experiment";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `levels` mod in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, levels"><title>experiment::levels - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module levels</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'levels', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/levels.rs.html#1-53' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>levels</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/levels.rs.html#1-57' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>levels</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table><tr class='module-item'><td><a class="struct" href="struct.Level.html" title='experiment::levels::Level struct'>Level</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -1,17 +1,17 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Level` struct in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, Level"><title>experiment::levels::Level - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Level</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.goal">goal</a><a href="#structfield.map">map</a><a href="#structfield.minimap_zoom">minimap_zoom</a><a href="#structfield.num_upzones">num_upzones</a><a href="#structfield.start">start</a><a href="#structfield.time_limit">time_limit</a><a href="#structfield.title">title</a><a href="#structfield.vehicles">vehicles</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.all">all</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>levels</a></p><script>window.sidebarCurrent = {name: 'Level', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/levels.rs.html#6-15' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>levels</a>::<wbr><a class="struct" href=''>Level</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Level {
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Level</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.goal">goal</a><a href="#structfield.map">map</a><a href="#structfield.minimap_zoom">minimap_zoom</a><a href="#structfield.start">start</a><a href="#structfield.time_limit">time_limit</a><a href="#structfield.title">title</a><a href="#structfield.unlock_upzones">unlock_upzones</a><a href="#structfield.unlock_vehicles">unlock_vehicles</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.all">all</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>levels</a></p><script>window.sidebarCurrent = {name: 'Level', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/levels.rs.html#6-16' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>levels</a>::<wbr><a class="struct" href=''>Level</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Level {
|
||||
pub title: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||||
pub map: <a class="struct" href="../../abstutil/abst_paths/struct.MapName.html" title="struct abstutil::abst_paths::MapName">MapName</a>,
|
||||
pub start: <a class="struct" href="../../map_model/osm/struct.NodeID.html" title="struct map_model::osm::NodeID">NodeID</a>,
|
||||
pub minimap_zoom: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
||||
pub num_upzones: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
||||
pub vehicles: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><&'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>,
|
||||
pub time_limit: <a class="struct" href="../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>,
|
||||
pub goal: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
||||
pub unlock_upzones: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
||||
pub unlock_vehicles: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><&'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>,
|
||||
}</pre></div><h2 id='fields' class='fields small-section-header'>
|
||||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.title" class="structfield small-section-header"><a href="#structfield.title" class="anchor field"></a><code>title: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></span><span id="structfield.map" class="structfield small-section-header"><a href="#structfield.map" class="anchor field"></a><code>map: <a class="struct" href="../../abstutil/abst_paths/struct.MapName.html" title="struct abstutil::abst_paths::MapName">MapName</a></code></span><span id="structfield.start" class="structfield small-section-header"><a href="#structfield.start" class="anchor field"></a><code>start: <a class="struct" href="../../map_model/osm/struct.NodeID.html" title="struct map_model::osm::NodeID">NodeID</a></code></span><span id="structfield.minimap_zoom" class="structfield small-section-header"><a href="#structfield.minimap_zoom" class="anchor field"></a><code>minimap_zoom: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.num_upzones" class="structfield small-section-header"><a href="#structfield.num_upzones" class="anchor field"></a><code>num_upzones: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.vehicles" class="structfield small-section-header"><a href="#structfield.vehicles" class="anchor field"></a><code>vehicles: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><&'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code></span><span id="structfield.time_limit" class="structfield small-section-header"><a href="#structfield.time_limit" class="anchor field"></a><code>time_limit: <a class="struct" href="../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code></span><span id="structfield.goal" class="structfield small-section-header"><a href="#structfield.goal" class="anchor field"></a><code>goal: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/experiment/levels.rs.html#17-53' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.all' class="method"><code>pub fn <a href='#method.all' class='fnname'>all</a>() -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>></code><a class='srclink' href='../../src/experiment/levels.rs.html#19-52' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/experiment/levels.rs.html#5' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a></code><a class='srclink' href='../../src/experiment/levels.rs.html#5' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.title" class="structfield small-section-header"><a href="#structfield.title" class="anchor field"></a><code>title: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></span><span id="structfield.map" class="structfield small-section-header"><a href="#structfield.map" class="anchor field"></a><code>map: <a class="struct" href="../../abstutil/abst_paths/struct.MapName.html" title="struct abstutil::abst_paths::MapName">MapName</a></code></span><span id="structfield.start" class="structfield small-section-header"><a href="#structfield.start" class="anchor field"></a><code>start: <a class="struct" href="../../map_model/osm/struct.NodeID.html" title="struct map_model::osm::NodeID">NodeID</a></code></span><span id="structfield.minimap_zoom" class="structfield small-section-header"><a href="#structfield.minimap_zoom" class="anchor field"></a><code>minimap_zoom: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.time_limit" class="structfield small-section-header"><a href="#structfield.time_limit" class="anchor field"></a><code>time_limit: <a class="struct" href="../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code></span><span id="structfield.goal" class="structfield small-section-header"><a href="#structfield.goal" class="anchor field"></a><code>goal: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.unlock_upzones" class="structfield small-section-header"><a href="#structfield.unlock_upzones" class="anchor field"></a><code>unlock_upzones: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.unlock_vehicles" class="structfield small-section-header"><a href="#structfield.unlock_vehicles" class="anchor field"></a><code>unlock_vehicles: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><&'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/experiment/levels.rs.html#18-57' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.all' class="method"><code>pub fn <a href='#method.all' class='fnname'>all</a>() -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>></code><a class='srclink' href='../../src/experiment/levels.rs.html#20-56' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/experiment/levels.rs.html#5' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a></code><a class='srclink' href='../../src/experiment/levels.rs.html#5' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `session` mod in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, session"><title>experiment::session - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module session</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'session', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/session.rs.html#1-53' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>session</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/session.rs.html#1-83' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>session</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table><tr class='module-item'><td><a class="struct" href="struct.Session.html" title='experiment::session::Session struct'>Session</a></td><td class='docblock-short'><p>Persistent state that lasts across levels.</p>
|
||||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -1,15 +1,18 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Session` struct in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, Session"><title>experiment::session::Session - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Session</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.high_scores">high_scores</a><a href="#structfield.levels">levels</a><a href="#structfield.levels_unlocked">levels_unlocked</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.record_score">record_score</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>session</a></p><script>window.sidebarCurrent = {name: 'Session', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/session.rs.html#7-12' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>session</a>::<wbr><a class="struct" href=''>Session</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Session {
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Session</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.current_vehicle">current_vehicle</a><a href="#structfield.high_scores">high_scores</a><a href="#structfield.levels">levels</a><a href="#structfield.levels_unlocked">levels_unlocked</a><a href="#structfield.upzones_unlocked">upzones_unlocked</a><a href="#structfield.vehicles_unlocked">vehicles_unlocked</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.record_score">record_score</a><a href="#method.unlock_all">unlock_all</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>session</a></p><script>window.sidebarCurrent = {name: 'Session', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/session.rs.html#7-15' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>session</a>::<wbr><a class="struct" href=''>Session</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Session {
|
||||
pub levels: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>>,
|
||||
pub high_scores: <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><&'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>>,
|
||||
pub levels_unlocked: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
||||
pub current_vehicle: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||||
pub vehicles_unlocked: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><&'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>,
|
||||
pub upzones_unlocked: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
||||
}</pre></div><div class='docblock'><p>Persistent state that lasts across levels.</p>
|
||||
</div><h2 id='fields' class='fields small-section-header'>
|
||||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.levels" class="structfield small-section-header"><a href="#structfield.levels" class="anchor field"></a><code>levels: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>></code></span><span id="structfield.high_scores" class="structfield small-section-header"><a href="#structfield.high_scores" class="anchor field"></a><code>high_scores: <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><&'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>></code></span><div class='docblock'><p>Level title -> the top 3 scores</p>
|
||||
</div><span id="structfield.levels_unlocked" class="structfield small-section-header"><a href="#structfield.levels_unlocked" class="anchor field"></a><code>levels_unlocked: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/experiment/session.rs.html#14-53' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>() -> <a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a></code><a class='srclink' href='../../src/experiment/session.rs.html#15-26' title='goto source code'>[src]</a></h4><h4 id='method.record_score' class="method"><code>pub fn <a href='#method.record_score' class='fnname'>record_score</a>(<br> &mut self, <br> level: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br> score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../../src/experiment/session.rs.html#29-52' title='goto source code'>[src]</a></h4><div class='docblock'><p>If a message is returned, a new level and some powers were unlocked.</p>
|
||||
</div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div><span id="structfield.levels_unlocked" class="structfield small-section-header"><a href="#structfield.levels_unlocked" class="anchor field"></a><code>levels_unlocked: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.current_vehicle" class="structfield small-section-header"><a href="#structfield.current_vehicle" class="anchor field"></a><code>current_vehicle: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></span><span id="structfield.vehicles_unlocked" class="structfield small-section-header"><a href="#structfield.vehicles_unlocked" class="anchor field"></a><code>vehicles_unlocked: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><&'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code></span><span id="structfield.upzones_unlocked" class="structfield small-section-header"><a href="#structfield.upzones_unlocked" class="anchor field"></a><code>upzones_unlocked: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/experiment/session.rs.html#17-83' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>() -> <a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a></code><a class='srclink' href='../../src/experiment/session.rs.html#18-32' title='goto source code'>[src]</a></h4><h4 id='method.record_score' class="method"><code>pub fn <a href='#method.record_score' class='fnname'>record_score</a>(<br> &mut self, <br> level: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br> score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>></code><a class='srclink' href='../../src/experiment/session.rs.html#35-74' title='goto source code'>[src]</a></h4><div class='docblock'><p>If a message is returned, a new level and some powers were unlocked.</p>
|
||||
</div><h4 id='method.unlock_all' class="method"><code>pub fn <a href='#method.unlock_all' class='fnname'>unlock_all</a>(&mut self)</code><a class='srclink' href='../../src/experiment/session.rs.html#76-82' title='goto source code'>[src]</a></h4></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id='impl-Downcast' class='impl'><code class='in-band'>impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href='#impl-Downcast' class='anchor'></a></h3><div class='impl-items'><h4 id='method.into_any' class="method hidden"><code>fn <a href='#method.into_any' class='fnname'>into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `title` mod in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, title"><title>experiment::title - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module title</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'title', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/title.rs.html#1-104' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>title</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/title.rs.html#1-116' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>title</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table><tr class='module-item'><td><a class="struct" href="struct.TitleScreen.html" title='experiment::title::TitleScreen struct'>TitleScreen</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -4,9 +4,9 @@
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/title.rs.html#8-10' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a>::<wbr><a class="struct" href=''>TitleScreen</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct TitleScreen {
|
||||
panel: Panel,
|
||||
}</pre></div><h2 id='fields' class='fields small-section-header'>
|
||||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/experiment/title.rs.html#12-48' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>>></code><a class='srclink' href='../../src/experiment/title.rs.html#13-47' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-State%3CSimpleApp%3CSession%3E%3E' class='impl'><code class='in-band'>impl State<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>> for <a class="struct" href="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</a></code><a href='#impl-State%3CSimpleApp%3CSession%3E%3E' class='anchor'></a><a class='srclink' href='../../src/experiment/title.rs.html#50-104' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.event' class="method hidden"><code>fn <a href='#method.event' class='fnname'>event</a>(<br> &mut self, <br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>><br>) -> Transition<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>></code><a class='srclink' href='../../src/experiment/title.rs.html#51-94' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id='method.draw_baselayer' class="method hidden"><code>fn <a href='#method.draw_baselayer' class='fnname'>draw_baselayer</a>(&self) -> DrawBaselayer</code><a class='srclink' href='../../src/experiment/title.rs.html#96-98' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id='method.draw' class="method hidden"><code>fn <a href='#method.draw' class='fnname'>draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>)</code><a class='srclink' href='../../src/experiment/title.rs.html#100-103' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/experiment/title.rs.html#12-60' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>>></code><a class='srclink' href='../../src/experiment/title.rs.html#13-59' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-State%3CSimpleApp%3CSession%3E%3E' class='impl'><code class='in-band'>impl State<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>> for <a class="struct" href="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</a></code><a href='#impl-State%3CSimpleApp%3CSession%3E%3E' class='anchor'></a><a class='srclink' href='../../src/experiment/title.rs.html#62-116' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.event' class="method hidden"><code>fn <a href='#method.event' class='fnname'>event</a>(<br> &mut self, <br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>><br>) -> Transition<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>></code><a class='srclink' href='../../src/experiment/title.rs.html#63-106' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id='method.draw_baselayer' class="method hidden"><code>fn <a href='#method.draw_baselayer' class='fnname'>draw_baselayer</a>(&self) -> DrawBaselayer</code><a class='srclink' href='../../src/experiment/title.rs.html#108-110' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id='method.draw' class="method hidden"><code>fn <a href='#method.draw' class='fnname'>draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>)</code><a class='srclink' href='../../src/experiment/title.rs.html#112-115' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div><h4 id='method.on_destroy' class="method hidden"><code>fn <a href='#method.on_destroy' class='fnname'>on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
|
||||
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a></p><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-f38555f90777146b/out/built.rs.html#49' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Sat, 05 Dec 2020 00:34:28 +0000";</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-f38555f90777146b/out/built.rs.html#49' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Sat, 05 Dec 2020 00:55:23 +0000";</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
@ -112,7 +112,7 @@
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Results</span> {
|
||||
<span class="ident">panel</span>: <span class="ident">Panel</span>,
|
||||
<span class="ident">unlock_message</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">String</span><span class="op">></span>,
|
||||
<span class="ident">unlock_messages</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">String</span><span class="op">></span><span class="op">></span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Results</span> {
|
||||
@ -125,7 +125,7 @@
|
||||
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span> <span class="op">=</span> <span class="ident">ZOOM</span>;
|
||||
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_on_map_pt</span>(<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_bounds</span>().<span class="ident">center</span>());
|
||||
|
||||
<span class="kw">let</span> <span class="ident">unlock_message</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">record_score</span>(<span class="ident">level</span>.<span class="ident">title</span>, <span class="ident">score</span>);
|
||||
<span class="kw">let</span> <span class="ident">unlock_messages</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">record_score</span>(<span class="ident">level</span>.<span class="ident">title</span>, <span class="ident">score</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">new</span>();
|
||||
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"Results for {}"</span>, <span class="ident">level</span>.<span class="ident">title</span>)).<span class="ident">small_heading</span>());
|
||||
@ -149,7 +149,7 @@
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>);
|
||||
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">Results</span> {
|
||||
<span class="ident">panel</span>,
|
||||
<span class="ident">unlock_message</span>,
|
||||
<span class="ident">unlock_messages</span>,
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -165,11 +165,11 @@
|
||||
<span class="ident">Transition</span>::<span class="ident">Pop</span>,
|
||||
<span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">TitleScreen</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)),
|
||||
];
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">msg</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">unlock_message</span>.<span class="ident">take</span>() {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">msgs</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">unlock_messages</span>.<span class="ident">take</span>() {
|
||||
<span class="ident">transitions</span>.<span class="ident">push</span>(<span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="ident">PopupMsg</span>::<span class="ident">new</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"Level complete!"</span>,
|
||||
<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">msg</span>],
|
||||
<span class="ident">msgs</span>,
|
||||
)));
|
||||
}
|
||||
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Multi</span>(<span class="ident">transitions</span>);
|
||||
|
@ -209,10 +209,10 @@
|
||||
<span class="ident">Line</span>(<span class="string">"Refill presents from "</span>),
|
||||
<span class="ident">Line</span>(<span class="string">"stores"</span>).<span class="ident">fg</span>(<span class="ident">Color</span>::<span class="ident">YELLOW</span>),
|
||||
]);
|
||||
<span class="kw">if</span> <span class="ident">level</span>.<span class="ident">num_upzones</span> <span class="op">></span> <span class="number">0</span> {
|
||||
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">upzones_unlocked</span> <span class="op">></span> <span class="number">0</span> {
|
||||
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Upzone power: You can select {} houses to transform into stores"</span>,
|
||||
<span class="ident">level</span>.<span class="ident">num_upzones</span>
|
||||
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">upzones_unlocked</span>
|
||||
)));
|
||||
}
|
||||
|
||||
@ -224,8 +224,8 @@
|
||||
<span class="ident">Widget</span>::<span class="ident">dropdown</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"vehicle"</span>,
|
||||
<span class="ident">level</span>.<span class="ident">vehicles</span>[<span class="number">0</span>].<span class="ident">to_string</span>(),
|
||||
<span class="ident">Choice</span>::<span class="ident">strings</span>(<span class="ident">level</span>.<span class="ident">vehicles</span>.<span class="ident">clone</span>()),
|
||||
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">current_vehicle</span>.<span class="ident">to_string</span>(),
|
||||
<span class="ident">Choice</span>::<span class="ident">strings</span>(<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">vehicles_unlocked</span>.<span class="ident">clone</span>()),
|
||||
),
|
||||
]),
|
||||
<span class="ident">Btn</span>::<span class="ident">text_bg2</span>(<span class="string">"Start game"</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>, <span class="ident">Key</span>::<span class="ident">Enter</span>),
|
||||
@ -257,7 +257,7 @@
|
||||
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">normal_left_click</span>() {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">current_picks</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="ident">b</span>) {
|
||||
<span class="self">self</span>.<span class="ident">current_picks</span>.<span class="ident">remove</span>(<span class="kw-2">&</span><span class="ident">b</span>);
|
||||
} <span class="kw">else</span> <span class="kw">if</span> <span class="self">self</span>.<span class="ident">current_picks</span>.<span class="ident">len</span>() <span class="op"><</span> <span class="self">self</span>.<span class="ident">level</span>.<span class="ident">num_upzones</span> {
|
||||
} <span class="kw">else</span> <span class="kw">if</span> <span class="self">self</span>.<span class="ident">current_picks</span>.<span class="ident">len</span>() <span class="op"><</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">upzones_unlocked</span> {
|
||||
<span class="self">self</span>.<span class="ident">current_picks</span>.<span class="ident">insert</span>(<span class="ident">b</span>);
|
||||
}
|
||||
}
|
||||
|
@ -473,6 +473,8 @@
|
||||
<span id="470">470</span>
|
||||
<span id="471">471</span>
|
||||
<span id="472">472</span>
|
||||
<span id="473">473</span>
|
||||
<span id="474">474</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashSet</span>;
|
||||
|
||||
@ -515,11 +517,13 @@
|
||||
<span class="kw">impl</span> <span class="ident">Game</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(
|
||||
<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
|
||||
<span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>,
|
||||
<span class="ident">app</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">App</span>,
|
||||
<span class="ident">level</span>: <span class="ident">Level</span>,
|
||||
<span class="ident">vehicle</span>: <span class="ident">Vehicle</span>,
|
||||
<span class="ident">upzones</span>: <span class="ident">HashSet</span><span class="op"><</span><span class="ident">BuildingID</span><span class="op">></span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="ident">Box</span><span class="op"><</span><span class="ident">dyn</span> <span class="ident">State</span><span class="op"><</span><span class="ident">App</span><span class="op">></span><span class="op">></span> {
|
||||
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">current_vehicle</span> <span class="op">=</span> <span class="ident">vehicle</span>.<span class="ident">name</span>;
|
||||
|
||||
<span class="kw">let</span> <span class="ident">title_panel</span> <span class="op">=</span> <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Btn</span>::<span class="ident">svg_def</span>(<span class="string">"system/assets/tools/home.svg"</span>).<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">"back"</span>, <span class="ident">Key</span>::<span class="ident">Escape</span>),
|
||||
<span class="string">"15 min Santa"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
|
||||
|
@ -54,6 +54,10 @@
|
||||
<span id="51">51</span>
|
||||
<span id="52">52</span>
|
||||
<span id="53">53</span>
|
||||
<span id="54">54</span>
|
||||
<span id="55">55</span>
|
||||
<span id="56">56</span>
|
||||
<span id="57">57</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">MapName</span>;
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::<span class="ident">Duration</span>;
|
||||
@ -65,10 +69,11 @@
|
||||
<span class="kw">pub</span> <span class="ident">map</span>: <span class="ident">MapName</span>,
|
||||
<span class="kw">pub</span> <span class="ident">start</span>: <span class="ident">osm</span>::<span class="ident">NodeID</span>,
|
||||
<span class="kw">pub</span> <span class="ident">minimap_zoom</span>: <span class="ident">usize</span>,
|
||||
<span class="kw">pub</span> <span class="ident">num_upzones</span>: <span class="ident">usize</span>,
|
||||
<span class="kw">pub</span> <span class="ident">vehicles</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw-2">&</span><span class="lifetime">'static</span> <span class="ident">str</span><span class="op">></span>,
|
||||
<span class="kw">pub</span> <span class="ident">time_limit</span>: <span class="ident">Duration</span>,
|
||||
<span class="kw">pub</span> <span class="ident">goal</span>: <span class="ident">usize</span>,
|
||||
|
||||
<span class="kw">pub</span> <span class="ident">unlock_upzones</span>: <span class="ident">usize</span>,
|
||||
<span class="kw">pub</span> <span class="ident">unlock_vehicles</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw-2">&</span><span class="lifetime">'static</span> <span class="ident">str</span><span class="op">></span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Level</span> {
|
||||
@ -80,30 +85,33 @@
|
||||
<span class="ident">map</span>: <span class="ident">MapName</span>::<span class="ident">seattle</span>(<span class="string">"montlake"</span>),
|
||||
<span class="ident">start</span>: <span class="ident">osm</span>::<span class="ident">NodeID</span>(<span class="number">53084814</span>),
|
||||
<span class="ident">minimap_zoom</span>: <span class="number">1</span>,
|
||||
<span class="ident">num_upzones</span>: <span class="number">0</span>,
|
||||
<span class="ident">vehicles</span>: <span class="macro">vec</span><span class="macro">!</span>[<span class="string">"sleigh"</span>],
|
||||
<span class="ident">time_limit</span>: <span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">30.0</span>),
|
||||
<span class="ident">goal</span>: <span class="number">25</span>,
|
||||
|
||||
<span class="ident">unlock_upzones</span>: <span class="number">2</span>,
|
||||
<span class="ident">unlock_vehicles</span>: <span class="macro">vec</span><span class="macro">!</span>[<span class="string">"bike"</span>, <span class="string">"cargo bike"</span>],
|
||||
},
|
||||
<span class="ident">Level</span> {
|
||||
<span class="ident">title</span>: <span class="string">"Level 2 - a small neighborhood with upzones"</span>,
|
||||
<span class="ident">map</span>: <span class="ident">MapName</span>::<span class="ident">seattle</span>(<span class="string">"montlake"</span>),
|
||||
<span class="ident">start</span>: <span class="ident">osm</span>::<span class="ident">NodeID</span>(<span class="number">53084814</span>),
|
||||
<span class="ident">minimap_zoom</span>: <span class="number">1</span>,
|
||||
<span class="ident">num_upzones</span>: <span class="number">3</span>,
|
||||
<span class="ident">vehicles</span>: <span class="macro">vec</span><span class="macro">!</span>[<span class="string">"bike"</span>, <span class="string">"cargo bike"</span>, <span class="string">"sleigh"</span>],
|
||||
<span class="ident">time_limit</span>: <span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">4</span>),
|
||||
<span class="ident">goal</span>: <span class="number">1000</span>,
|
||||
|
||||
<span class="ident">unlock_upzones</span>: <span class="number">3</span>,
|
||||
<span class="ident">unlock_vehicles</span>: <span class="macro">vec</span><span class="macro">!</span>[],
|
||||
},
|
||||
<span class="ident">Level</span> {
|
||||
<span class="ident">title</span>: <span class="string">"Level 3 - Magnolia"</span>,
|
||||
<span class="ident">map</span>: <span class="ident">MapName</span>::<span class="ident">seattle</span>(<span class="string">"ballard"</span>),
|
||||
<span class="ident">start</span>: <span class="ident">osm</span>::<span class="ident">NodeID</span>(<span class="number">53117102</span>),
|
||||
<span class="ident">minimap_zoom</span>: <span class="number">2</span>,
|
||||
<span class="ident">num_upzones</span>: <span class="number">5</span>,
|
||||
<span class="ident">vehicles</span>: <span class="macro">vec</span><span class="macro">!</span>[<span class="string">"bike"</span>, <span class="string">"cargo bike"</span>, <span class="string">"sleigh"</span>],
|
||||
<span class="ident">time_limit</span>: <span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">5</span>),
|
||||
<span class="ident">goal</span>: <span class="number">1000</span>,
|
||||
|
||||
<span class="ident">unlock_upzones</span>: <span class="number">3</span>,
|
||||
<span class="ident">unlock_vehicles</span>: <span class="macro">vec</span><span class="macro">!</span>[],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
@ -43,6 +43,10 @@
|
||||
<span id="40">40</span>
|
||||
<span id="41">41</span>
|
||||
<span id="42">42</span>
|
||||
<span id="43">43</span>
|
||||
<span id="44">44</span>
|
||||
<span id="45">45</span>
|
||||
<span id="46">46</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="attribute">#[<span class="ident">macro_use</span>]</span>
|
||||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">log</span>;
|
||||
@ -67,12 +71,16 @@
|
||||
<span class="ident">widgetry</span>::<span class="ident">run</span>(<span class="ident">widgetry</span>::<span class="ident">Settings</span>::<span class="ident">new</span>(<span class="string">"experiment"</span>), <span class="op">|</span><span class="ident">ctx</span><span class="op">|</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">opts</span> <span class="op">=</span> <span class="ident">map_gui</span>::<span class="ident">options</span>::<span class="ident">Options</span>::<span class="ident">default</span>();
|
||||
<span class="ident">opts</span>.<span class="ident">color_scheme</span> <span class="op">=</span> <span class="ident">map_gui</span>::<span class="ident">colors</span>::<span class="ident">ColorSchemeChoice</span>::<span class="ident">NightMode</span>;
|
||||
<span class="kw">let</span> <span class="ident">app</span> <span class="op">=</span> <span class="ident">map_gui</span>::<span class="ident">SimpleApp</span>::<span class="ident">new_with_opts</span>(
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">app</span> <span class="op">=</span> <span class="ident">map_gui</span>::<span class="ident">SimpleApp</span>::<span class="ident">new_with_opts</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">abstutil</span>::<span class="ident">CmdArgs</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">opts</span>,
|
||||
<span class="ident">session</span>::<span class="ident">Session</span>::<span class="ident">new</span>(),
|
||||
);
|
||||
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">dev</span> {
|
||||
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">unlock_all</span>();
|
||||
}
|
||||
|
||||
<span class="kw">let</span> <span class="ident">states</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="ident">title</span>::<span class="ident">TitleScreen</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="ident">app</span>)];
|
||||
(<span class="ident">app</span>, <span class="ident">states</span>)
|
||||
});
|
||||
|
@ -54,6 +54,36 @@
|
||||
<span id="51">51</span>
|
||||
<span id="52">52</span>
|
||||
<span id="53">53</span>
|
||||
<span id="54">54</span>
|
||||
<span id="55">55</span>
|
||||
<span id="56">56</span>
|
||||
<span id="57">57</span>
|
||||
<span id="58">58</span>
|
||||
<span id="59">59</span>
|
||||
<span id="60">60</span>
|
||||
<span id="61">61</span>
|
||||
<span id="62">62</span>
|
||||
<span id="63">63</span>
|
||||
<span id="64">64</span>
|
||||
<span id="65">65</span>
|
||||
<span id="66">66</span>
|
||||
<span id="67">67</span>
|
||||
<span id="68">68</span>
|
||||
<span id="69">69</span>
|
||||
<span id="70">70</span>
|
||||
<span id="71">71</span>
|
||||
<span id="72">72</span>
|
||||
<span id="73">73</span>
|
||||
<span id="74">74</span>
|
||||
<span id="75">75</span>
|
||||
<span id="76">76</span>
|
||||
<span id="77">77</span>
|
||||
<span id="78">78</span>
|
||||
<span id="79">79</span>
|
||||
<span id="80">80</span>
|
||||
<span id="81">81</span>
|
||||
<span id="82">82</span>
|
||||
<span id="83">83</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashMap</span>;
|
||||
|
||||
@ -66,6 +96,9 @@
|
||||
<span class="doccomment">/// Level title -> the top 3 scores</span>
|
||||
<span class="kw">pub</span> <span class="ident">high_scores</span>: <span class="ident">HashMap</span><span class="op"><</span><span class="kw-2">&</span><span class="lifetime">'static</span> <span class="ident">str</span>, <span class="ident">Vec</span><span class="op"><</span><span class="ident">usize</span><span class="op">></span><span class="op">></span>,
|
||||
<span class="kw">pub</span> <span class="ident">levels_unlocked</span>: <span class="ident">usize</span>,
|
||||
<span class="kw">pub</span> <span class="ident">current_vehicle</span>: <span class="kw-2">&</span><span class="lifetime">'static</span> <span class="ident">str</span>,
|
||||
<span class="kw">pub</span> <span class="ident">vehicles_unlocked</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw-2">&</span><span class="lifetime">'static</span> <span class="ident">str</span><span class="op">></span>,
|
||||
<span class="kw">pub</span> <span class="ident">upzones_unlocked</span>: <span class="ident">usize</span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Session</span> {
|
||||
@ -79,11 +112,14 @@
|
||||
<span class="ident">levels</span>,
|
||||
<span class="ident">high_scores</span>,
|
||||
<span class="ident">levels_unlocked</span>: <span class="number">1</span>,
|
||||
<span class="ident">current_vehicle</span>: <span class="string">"sleigh"</span>,
|
||||
<span class="ident">vehicles_unlocked</span>: <span class="macro">vec</span><span class="macro">!</span>[<span class="string">"sleigh"</span>],
|
||||
<span class="ident">upzones_unlocked</span>: <span class="number">0</span>,
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// If a message is returned, a new level and some powers were unlocked.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">record_score</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">level</span>: <span class="kw-2">&</span><span class="lifetime">'static</span> <span class="ident">str</span>, <span class="ident">score</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">String</span><span class="op">></span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">record_score</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">level</span>: <span class="kw-2">&</span><span class="lifetime">'static</span> <span class="ident">str</span>, <span class="ident">score</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">String</span><span class="op">></span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">scores</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">high_scores</span>.<span class="ident">get_mut</span>(<span class="ident">level</span>).<span class="ident">unwrap</span>();
|
||||
<span class="ident">scores</span>.<span class="ident">push</span>(<span class="ident">score</span>);
|
||||
<span class="ident">scores</span>.<span class="ident">sort</span>();
|
||||
@ -95,18 +131,42 @@
|
||||
.<span class="ident">iter</span>()
|
||||
.<span class="ident">position</span>(<span class="op">|</span><span class="ident">lvl</span><span class="op">|</span> <span class="ident">lvl</span>.<span class="ident">title</span> <span class="op">=</span><span class="op">=</span> <span class="ident">level</span>)
|
||||
.<span class="ident">unwrap</span>();
|
||||
<span class="kw">if</span> <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span> <span class="op">=</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">levels_unlocked</span> <span class="op">&&</span> <span class="ident">score</span> <span class="op">></span><span class="op">=</span> <span class="self">self</span>.<span class="ident">levels</span>[<span class="ident">idx</span>].<span class="ident">goal</span> {
|
||||
<span class="kw">let</span> <span class="ident">level</span> <span class="op">=</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">levels</span>[<span class="ident">idx</span>];
|
||||
<span class="kw">if</span> <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span> <span class="op">=</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">levels_unlocked</span> <span class="op">&&</span> <span class="ident">score</span> <span class="op">></span><span class="op">=</span> <span class="ident">level</span>.<span class="ident">goal</span> {
|
||||
<span class="kw">if</span> <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span> <span class="op">=</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">levels</span>.<span class="ident">len</span>() {
|
||||
<span class="prelude-val">Some</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"All levels complete! Nice."</span>))
|
||||
<span class="prelude-val">Some</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"All levels complete! Nice."</span>),
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"Can you improve your score on other levels?"</span>),
|
||||
])
|
||||
} <span class="kw">else</span> {
|
||||
<span class="self">self</span>.<span class="ident">levels_unlocked</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
<span class="prelude-val">Some</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"New level unlocked!"</span>))
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">messages</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="macro">format</span><span class="macro">!</span>(<span class="string">"New level unlocked!"</span>)];
|
||||
<span class="kw">if</span> <span class="ident">level</span>.<span class="ident">unlock_upzones</span> <span class="op">></span> <span class="number">0</span> {
|
||||
<span class="self">self</span>.<span class="ident">upzones_unlocked</span> <span class="op">+</span><span class="op">=</span> <span class="ident">level</span>.<span class="ident">unlock_upzones</span>;
|
||||
<span class="ident">messages</span>.<span class="ident">push</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Unlocked the ability to upzone {} buildings"</span>,
|
||||
<span class="ident">level</span>.<span class="ident">unlock_upzones</span>
|
||||
));
|
||||
}
|
||||
<span class="kw">for</span> <span class="ident">x</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="ident">level</span>.<span class="ident">unlock_vehicles</span> {
|
||||
<span class="self">self</span>.<span class="ident">vehicles_unlocked</span>.<span class="ident">push</span>(<span class="kw-2">*</span><span class="ident">x</span>);
|
||||
<span class="ident">messages</span>.<span class="ident">push</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"Unlocked the {}"</span>, <span class="ident">x</span>));
|
||||
}
|
||||
<span class="prelude-val">Some</span>(<span class="ident">messages</span>)
|
||||
}
|
||||
} <span class="kw">else</span> {
|
||||
<span class="comment">// Nothing new unlocked</span>
|
||||
<span class="prelude-val">None</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">unlock_all</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) {
|
||||
<span class="kw">for</span> <span class="ident">level</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">levels</span> {
|
||||
<span class="self">self</span>.<span class="ident">vehicles_unlocked</span>.<span class="ident">extend</span>(<span class="ident">level</span>.<span class="ident">unlock_vehicles</span>.<span class="ident">clone</span>());
|
||||
<span class="self">self</span>.<span class="ident">upzones_unlocked</span> <span class="op">+</span><span class="op">=</span> <span class="ident">level</span>.<span class="ident">unlock_upzones</span>;
|
||||
}
|
||||
<span class="self">self</span>.<span class="ident">levels_unlocked</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">levels</span>.<span class="ident">len</span>();
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -105,6 +105,18 @@
|
||||
<span id="102">102</span>
|
||||
<span id="103">103</span>
|
||||
<span id="104">104</span>
|
||||
<span id="105">105</span>
|
||||
<span id="106">106</span>
|
||||
<span id="107">107</span>
|
||||
<span id="108">108</span>
|
||||
<span id="109">109</span>
|
||||
<span id="110">110</span>
|
||||
<span id="111">111</span>
|
||||
<span id="112">112</span>
|
||||
<span id="113">113</span>
|
||||
<span id="114">114</span>
|
||||
<span id="115">115</span>
|
||||
<span id="116">116</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::{<span class="ident">open_browser</span>, <span class="ident">PopupMsg</span>};
|
||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{
|
||||
@ -128,6 +140,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">let</span> <span class="ident">upgrades</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">from_multiline</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Vehicles unlocked: {}"</span>,
|
||||
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">vehicles_unlocked</span>.<span class="ident">join</span>(<span class="string">", "</span>),
|
||||
)),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Upzones unlocked: {}"</span>,
|
||||
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">upzones_unlocked</span>
|
||||
)),
|
||||
]);
|
||||
|
||||
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">TitleScreen</span> {
|
||||
<span class="ident">panel</span>: <span class="ident">Panel</span>::<span class="ident">new</span>(
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
@ -146,6 +169,7 @@
|
||||
),
|
||||
<span class="ident">Btn</span>::<span class="ident">text_bg2</span>(<span class="string">"Instructions"</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>, <span class="prelude-val">None</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="ident">level_buttons</span>),
|
||||
<span class="ident">upgrades</span>.<span class="ident">draw</span>(<span class="ident">ctx</span>),
|
||||
])
|
||||
.<span class="ident">evenly_spaced</span>(),
|
||||
)
|
||||
|
@ -114,7 +114,7 @@
|
||||
<span class="doccomment">/// The output of `rustdoc -V`</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"rustdoc 1.48.0 (7eac88abb 2020-11-16)"</span>;
|
||||
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Sat, 05 Dec 2020 00:34:28 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Sat, 05 Dec 2020 00:55:23 +0000"</span>;
|
||||
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"x86_64"</span>;
|
||||
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>
|
||||
|
Loading…
Reference in New Issue
Block a user