deploy: f2007d1d2bbf3a7fb2a41169f078825dcb5025e3
This commit is contained in:
parent
51aee9b90c
commit
b532c558af
@ -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 `player` mod in crate `game_logic`."><meta name="keywords" content="rust, rustlang, rust-lang, player"><title>game_logic::model::player - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><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="../../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><script defer src="../../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../../game_logic/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.png" alt="logo"></div>
|
||||
</a><h2 class="location">Module player</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="player" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../game_logic/index.html"><img class="rust-logo" src="../../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">game_logic</a>::<wbr><a href="../index.html">model</a>::<wbr><a class="mod" href="#">player</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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_logic/model/player.rs.html#1-22" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
</a><h2 class="location">Module player</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="player" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../game_logic/index.html"><img class="rust-logo" src="../../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">game_logic</a>::<wbr><a href="../index.html">model</a>::<wbr><a class="mod" href="#">player</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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_logic/model/player.rs.html#1-53" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Player.html" title="game_logic::model::player::Player struct">Player</a></div><div class="item-right docblock-short"></div></div></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game_logic" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.59.0 (9d1b2106e 2022-02-23)" ></div>
|
||||
</body></html>
|
@ -1,13 +1,13 @@
|
||||
<!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 `Player` struct in crate `game_logic`."><meta name="keywords" content="rust, rustlang, rust-lang, Player"><title>Player in game_logic::model::player - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><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="../../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><script defer src="../../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../../game_logic/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.png" alt="logo"></div>
|
||||
</a><h2 class="location">Struct Player</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.position">position</a><a href="#structfield.size">size</a><a href="#structfield.velocity">velocity</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.new">new</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><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><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><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-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-SupersetOf%3CSS%3E">SupersetOf<SS></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-WithSubscriber">WithSubscriber</a></div></div><h2 class="location">Other items in<br><a href="../../index.html">game_logic</a>::<wbr><a href="../index.html">model</a>::<wbr><a href="index.html">player</a></h2><div id="sidebar-vars" data-name="Player" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../game_logic/index.html"><img class="rust-logo" src="../../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">game_logic</a>::<wbr><a href="../index.html">model</a>::<wbr><a href="index.html">player</a>::<wbr><a class="struct" href="#">Player</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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_logic/model/player.rs.html#5-9" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct Player {
|
||||
</a><h2 class="location">Struct Player</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.active_texture">active_texture</a><a href="#structfield.position">position</a><a href="#structfield.size">size</a><a href="#structfield.textures">textures</a><a href="#structfield.velocity">velocity</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.new">new</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><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><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><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-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-SupersetOf%3CSS%3E">SupersetOf<SS></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-WithSubscriber">WithSubscriber</a></div></div><h2 class="location">Other items in<br><a href="../../index.html">game_logic</a>::<wbr><a href="../index.html">model</a>::<wbr><a href="index.html">player</a></h2><div id="sidebar-vars" data-name="Player" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../game_logic/index.html"><img class="rust-logo" src="../../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">game_logic</a>::<wbr><a href="../index.html">model</a>::<wbr><a href="index.html">player</a>::<wbr><a class="struct" href="#">Player</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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_logic/model/player.rs.html#8-14" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct Player {
|
||||
pub position: <a class="type" href="https://docs.rs/nalgebra/0.25.0/nalgebra/base/alias/type.Vector2.html" title="type nalgebra::base::alias::Vector2">Vector2</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>>,
|
||||
pub velocity: <a class="type" href="https://docs.rs/nalgebra/0.25.0/nalgebra/base/alias/type.Vector2.html" title="type nalgebra::base::alias::Vector2">Vector2</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>>,
|
||||
pub size: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>,
|
||||
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.position" class="structfield small-section-header"><a href="#structfield.position" class="anchor field"></a><code>position: <a class="type" href="https://docs.rs/nalgebra/0.25.0/nalgebra/base/alias/type.Vector2.html" title="type nalgebra::base::alias::Vector2">Vector2</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>></code></span><span id="structfield.velocity" class="structfield small-section-header"><a href="#structfield.velocity" class="anchor field"></a><code>velocity: <a class="type" href="https://docs.rs/nalgebra/0.25.0/nalgebra/base/alias/type.Vector2.html" title="type nalgebra::base::alias::Vector2">Vector2</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>></code></span><span id="structfield.size" class="structfield small-section-header"><a href="#structfield.size" class="anchor field"></a><code>size: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/model/player.rs.html#11-22" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Player.html" title="struct game_logic::model::player::Player">Player</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.new" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/model/player.rs.html#14-20" title="goto source code">[src]</a></div><a href="#method.new" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(position: <a class="type" href="https://docs.rs/nalgebra/0.25.0/nalgebra/base/alias/type.Vector2.html" title="type nalgebra::base::alias::Vector2">Vector2</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>>) -> Self</h4></div></summary><div class="docblock"><p>Construct a new player.</p>
|
||||
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/model/player.rs.html#4" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Player.html" title="struct game_logic::model::player::Player">Player</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/model/player.rs.html#4" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Player.html" title="struct game_logic::model::player::Player">Player</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/clone.rs.html#130" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/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/1.59.0/std/primitive.reference.html">&</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/model/player.rs.html#4" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Player.html" title="struct game_logic::model::player::Player">Player</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/model/player.rs.html#4" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.59.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
pub active_texture: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>,
|
||||
pub textures: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Texture2D>,
|
||||
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.position" class="structfield small-section-header"><a href="#structfield.position" class="anchor field"></a><code>position: <a class="type" href="https://docs.rs/nalgebra/0.25.0/nalgebra/base/alias/type.Vector2.html" title="type nalgebra::base::alias::Vector2">Vector2</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>></code></span><span id="structfield.velocity" class="structfield small-section-header"><a href="#structfield.velocity" class="anchor field"></a><code>velocity: <a class="type" href="https://docs.rs/nalgebra/0.25.0/nalgebra/base/alias/type.Vector2.html" title="type nalgebra::base::alias::Vector2">Vector2</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>></code></span><span id="structfield.size" class="structfield small-section-header"><a href="#structfield.size" class="anchor field"></a><code>size: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a></code></span><span id="structfield.active_texture" class="structfield small-section-header"><a href="#structfield.active_texture" class="anchor field"></a><code>active_texture: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a></code></span><span id="structfield.textures" class="structfield small-section-header"><a href="#structfield.textures" class="anchor field"></a><code>textures: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Texture2D></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/model/player.rs.html#16-53" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Player.html" title="struct game_logic::model::player::Player">Player</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.new" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/model/player.rs.html#18-52" title="goto source code">[src]</a></div><a href="#method.new" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(<br> raylib_handle: &mut RaylibHandle, <br> thread: &RaylibThread, <br> position: <a class="type" href="https://docs.rs/nalgebra/0.25.0/nalgebra/base/alias/type.Vector2.html" title="type nalgebra::base::alias::Vector2">Vector2</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>><br>) -> Self</h4></div></summary><div class="docblock"><p>Construct a new player.</p>
|
||||
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/model/player.rs.html#7" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Player.html" title="struct game_logic::model::player::Player">Player</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/model/player.rs.html#7" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.59.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></details></div></details></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"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Player.html" title="struct game_logic::model::player::Player">Player</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Player.html" title="struct game_logic::model::player::Player">Player</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Player.html" title="struct game_logic::model::player::Player">Player</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Player.html" title="struct game_logic::model::player::Player">Player</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Player.html" title="struct game_logic::model::player::Player">Player</a></h3></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"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/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/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.59.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#209-214" title="goto source code">[src]</a></div><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/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/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#211" title="goto source code">[src]</a></div><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&</a>T</h4></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#218-222" title="goto source code">[src]</a></div><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/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/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#219" title="goto source code">[src]</a></div><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&mut </a>T</h4></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
@ -23,9 +23,6 @@ superset. <a href="#method.to_subset">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_in_subset" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.is_in_subset" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">is_in_subset</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><div class='docblock'><p>Checks if <code>self</code> is actually part of its subset <code>T</code> (and can be converted to it).</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.to_subset_unchecked" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.to_subset_unchecked" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">to_subset_unchecked</a>(&self) -> SS</h4></div></summary><div class='docblock'><p>Use with care! Same as <code>self.to_subset</code> but without any property checks. Always succeeds.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from_subset" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.from_subset" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">from_subset</a>(element: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&</a>SS) -> SP</h4></div></summary><div class='docblock'><p>The inclusion map: converts <code>self</code> to the equivalent element of its superset.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-ToOwned" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/alloc/borrow.rs.html#84-96" title="goto source code">[src]</a></div><a href="#impl-ToOwned" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Owned" class="type trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.59.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></div></summary><div class='docblock'><p>The resulting type after obtaining ownership.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.to_owned" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/alloc/borrow.rs.html#89" title="goto source code">[src]</a></div><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></div></summary><div class='docblock'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.59.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_into" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/alloc/borrow.rs.html#93" title="goto source code">[src]</a></div><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&mut </a>T)</h4></div></summary><div class="item-info"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code> <a href="https://github.com/Ewpratten/ludum-dare-50/issues/41263">#41263</a>)</div></div><div class='docblock'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.59.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#588-597" title="goto source code">[src]</a></div><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#594" title="goto source code">[src]</a></div><a href="#method.try_from" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#574-583" title="goto source code">[src]</a></div><a href="#impl-TryInto%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</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="The rust side of the `dist/project-constants.json` file"><meta name="keywords" content="rust, rustlang, rust-lang, project_constants"><title>game_logic::project_constants - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><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="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../game_logic/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><h2 class="location">Module project_constants</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="project_constants" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../game_logic/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">game_logic</a>::<wbr><a class="mod" href="#">project_constants</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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_logic/project_constants.rs.html#1-68" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The rust side of the <code>dist/project-constants.json</code> file</p>
|
||||
</a><h2 class="location">Module project_constants</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="project_constants" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../game_logic/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">game_logic</a>::<wbr><a class="mod" href="#">project_constants</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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_logic/project_constants.rs.html#1-71" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The rust side of the <code>dist/project-constants.json</code> file</p>
|
||||
<h3 id="overview" class="section-header"><a href="#overview">Overview</a></h3>
|
||||
<p>This file contains a structure defining all data we want to load from the project constants file.
|
||||
Feel free to add anything you’d like here, just make sure the relavant data is also written in the JSON file so the game doesn’t crash.
|
||||
|
@ -1,15 +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="Constants relating to the Player"><meta name="keywords" content="rust, rustlang, rust-lang, PlayerConstants"><title>PlayerConstants in game_logic::project_constants - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><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="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../game_logic/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><h2 class="location">Struct PlayerConstants</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.acceleration">acceleration</a><a href="#structfield.deceleration">deceleration</a><a href="#structfield.max_velocity">max_velocity</a><a href="#structfield.start_size">start_size</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><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><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><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-DeserializeOwned">DeserializeOwned</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-SupersetOf%3CSS%3E">SupersetOf<SS></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-WithSubscriber">WithSubscriber</a></div></div><h2 class="location">Other items in<br><a href="../index.html">game_logic</a>::<wbr><a href="index.html">project_constants</a></h2><div id="sidebar-vars" data-name="PlayerConstants" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../game_logic/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">game_logic</a>::<wbr><a href="index.html">project_constants</a>::<wbr><a class="struct" href="#">PlayerConstants</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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_logic/project_constants.rs.html#33-46" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct PlayerConstants {
|
||||
</a><h2 class="location">Struct PlayerConstants</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.acceleration">acceleration</a><a href="#structfield.deceleration">deceleration</a><a href="#structfield.max_velocity">max_velocity</a><a href="#structfield.melt_speed">melt_speed</a><a href="#structfield.start_size">start_size</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><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><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><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-DeserializeOwned">DeserializeOwned</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-SupersetOf%3CSS%3E">SupersetOf<SS></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-WithSubscriber">WithSubscriber</a></div></div><h2 class="location">Other items in<br><a href="../index.html">game_logic</a>::<wbr><a href="index.html">project_constants</a></h2><div id="sidebar-vars" data-name="PlayerConstants" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../game_logic/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">game_logic</a>::<wbr><a href="index.html">project_constants</a>::<wbr><a class="struct" href="#">PlayerConstants</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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_logic/project_constants.rs.html#33-49" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct PlayerConstants {
|
||||
pub max_velocity: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>,
|
||||
pub acceleration: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>,
|
||||
pub deceleration: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>,
|
||||
pub start_size: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>,
|
||||
pub melt_speed: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>,
|
||||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Constants relating to the Player</p>
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.max_velocity" class="structfield small-section-header"><a href="#structfield.max_velocity" class="anchor field"></a><code>max_velocity: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a></code></span><div class="docblock"><p>Maximum velocity, tiles per second</p>
|
||||
</div><span id="structfield.acceleration" class="structfield small-section-header"><a href="#structfield.acceleration" class="anchor field"></a><code>acceleration: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a></code></span><div class="docblock"><p>Acceleration, tiles per second per second</p>
|
||||
</div><span id="structfield.deceleration" class="structfield small-section-header"><a href="#structfield.deceleration" class="anchor field"></a><code>deceleration: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a></code></span><div class="docblock"><p>Deceleration, tiles per second per second</p>
|
||||
</div><span id="structfield.start_size" class="structfield small-section-header"><a href="#structfield.start_size" class="anchor field"></a><code>start_size: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a></code></span><div class="docblock"><p>Starting size of player in tiles</p>
|
||||
</div><span id="structfield.melt_speed" class="structfield small-section-header"><a href="#structfield.melt_speed" class="anchor field"></a><code>melt_speed: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a></code></span><div class="docblock"><p>Base melting speed in percent per second</p>
|
||||
</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game_logic/project_constants.rs.html#32" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.PlayerConstants.html" title="struct game_logic::project_constants::PlayerConstants">PlayerConstants</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game_logic/project_constants.rs.html#32" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.59.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Deserialize%3C%27de%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game_logic/project_constants.rs.html#32" title="goto source code">[src]</a></div><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><h3 class="code-header in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="struct.PlayerConstants.html" title="struct game_logic::project_constants::PlayerConstants">PlayerConstants</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.deserialize" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game_logic/project_constants.rs.html#32" title="goto source code">[src]</a></div><a href="#method.deserialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="associatedtype" href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></h4></div></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div></details></div></details></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"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.PlayerConstants.html" title="struct game_logic::project_constants::PlayerConstants">PlayerConstants</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.PlayerConstants.html" title="struct game_logic::project_constants::PlayerConstants">PlayerConstants</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.PlayerConstants.html" title="struct game_logic::project_constants::PlayerConstants">PlayerConstants</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.PlayerConstants.html" title="struct game_logic::project_constants::PlayerConstants">PlayerConstants</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.PlayerConstants.html" title="struct game_logic::project_constants::PlayerConstants">PlayerConstants</a></h3></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"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/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/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.59.0/core/any/trait.Any.html#tymethod.type_id">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="This structure is filled with the contents of `dist/project-constants.json` at runtime"><meta name="keywords" content="rust, rustlang, rust-lang, ProjectConstants"><title>ProjectConstants in game_logic::project_constants - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><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="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../game_logic/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><h2 class="location">Struct ProjectConstants</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.base_window_size">base_window_size</a><a href="#structfield.discord">discord</a><a href="#structfield.game_name">game_name</a><a href="#structfield.player">player</a><a href="#structfield.target_fps">target_fps</a><a href="#structfield.tile_size">tile_size</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><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><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><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-DeserializeOwned">DeserializeOwned</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-SupersetOf%3CSS%3E">SupersetOf<SS></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-WithSubscriber">WithSubscriber</a></div></div><h2 class="location">Other items in<br><a href="../index.html">game_logic</a>::<wbr><a href="index.html">project_constants</a></h2><div id="sidebar-vars" data-name="ProjectConstants" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../game_logic/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">game_logic</a>::<wbr><a href="index.html">project_constants</a>::<wbr><a class="struct" href="#">ProjectConstants</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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_logic/project_constants.rs.html#50-68" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct ProjectConstants {
|
||||
</a><h2 class="location">Struct ProjectConstants</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.base_window_size">base_window_size</a><a href="#structfield.discord">discord</a><a href="#structfield.game_name">game_name</a><a href="#structfield.player">player</a><a href="#structfield.target_fps">target_fps</a><a href="#structfield.tile_size">tile_size</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><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><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><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-DeserializeOwned">DeserializeOwned</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-SupersetOf%3CSS%3E">SupersetOf<SS></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-WithSubscriber">WithSubscriber</a></div></div><h2 class="location">Other items in<br><a href="../index.html">game_logic</a>::<wbr><a href="index.html">project_constants</a></h2><div id="sidebar-vars" data-name="ProjectConstants" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../game_logic/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">game_logic</a>::<wbr><a href="index.html">project_constants</a>::<wbr><a class="struct" href="#">ProjectConstants</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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_logic/project_constants.rs.html#53-71" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct ProjectConstants {
|
||||
pub game_name: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
|
||||
pub base_window_size: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.tuple.html">)</a>,
|
||||
pub discord: <a class="struct" href="struct.DiscordConstants.html" title="struct game_logic::project_constants::DiscordConstants">DiscordConstants</a>,
|
||||
@ -14,8 +14,8 @@
|
||||
</div><span id="structfield.player" class="structfield small-section-header"><a href="#structfield.player" class="anchor field"></a><code>player: <a class="struct" href="struct.PlayerConstants.html" title="struct game_logic::project_constants::PlayerConstants">PlayerConstants</a></code></span><div class="docblock"><p>The Player constants</p>
|
||||
</div><span id="structfield.target_fps" class="structfield small-section-header"><a href="#structfield.target_fps" class="anchor field"></a><code>target_fps: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a></code></span><div class="docblock"><p>The target framerate of the game</p>
|
||||
</div><span id="structfield.tile_size" class="structfield small-section-header"><a href="#structfield.tile_size" class="anchor field"></a><code>tile_size: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a></code></span><div class="docblock"><p>The size of the game tiles</p>
|
||||
</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game_logic/project_constants.rs.html#49" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game_logic/project_constants.rs.html#49" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.59.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Deserialize%3C%27de%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game_logic/project_constants.rs.html#49" title="goto source code">[src]</a></div><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><h3 class="code-header in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.deserialize" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game_logic/project_constants.rs.html#49" title="goto source code">[src]</a></div><a href="#method.deserialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="associatedtype" href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></h4></div></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game_logic/project_constants.rs.html#52" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game_logic/project_constants.rs.html#52" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.59.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Deserialize%3C%27de%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game_logic/project_constants.rs.html#52" title="goto source code">[src]</a></div><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><h3 class="code-header in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.deserialize" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game_logic/project_constants.rs.html#52" title="goto source code">[src]</a></div><a href="#method.deserialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="associatedtype" href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></h4></div></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.136/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div></details></div></details></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"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a></h3></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"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/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/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.59.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#209-214" title="goto source code">[src]</a></div><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/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/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#211" title="goto source code">[src]</a></div><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&</a>T</h4></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#218-222" title="goto source code">[src]</a></div><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/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/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#219" title="goto source code">[src]</a></div><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&mut </a>T</h4></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">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="This scene encompasses all of the game where the player can walk around."><meta name="keywords" content="rust, rustlang, rust-lang, player_interaction"><title>game_logic::scenes::player_interaction - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><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="../../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><script defer src="../../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../../game_logic/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.png" alt="logo"></div>
|
||||
</a><h2 class="location">Module player_interaction</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="player_interaction" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../game_logic/index.html"><img class="rust-logo" src="../../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">game_logic</a>::<wbr><a href="../index.html">scenes</a>::<wbr><a class="mod" href="#">player_interaction</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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_logic/scenes/player_interaction.rs.html#1-398" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This scene encompasses all of the game where the player can walk around.</p>
|
||||
</a><h2 class="location">Module player_interaction</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="player_interaction" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../game_logic/index.html"><img class="rust-logo" src="../../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">game_logic</a>::<wbr><a href="../index.html">scenes</a>::<wbr><a class="mod" href="#">player_interaction</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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_logic/scenes/player_interaction.rs.html#1-433" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This scene encompasses all of the game where the player can walk around.</p>
|
||||
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.PlayableScene.html" title="game_logic::scenes::player_interaction::PlayableScene struct">PlayableScene</a></div><div class="item-right docblock-short"></div></div></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game_logic" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.59.0 (9d1b2106e 2022-02-23)" ></div>
|
||||
</body></html>
|
@ -11,9 +11,9 @@
|
||||
show_debug_info: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>,
|
||||
play_start_time: <a class="struct" href="https://docs.rs/chrono/latest/chrono/datetime/struct.DateTime.html" title="struct chrono::datetime::DateTime">DateTime</a><<a class="struct" href="https://docs.rs/chrono/latest/chrono/offset/utc/struct.Utc.html" title="struct chrono::offset::utc::Utc">Utc</a>>,
|
||||
player_start_position: <a class="type" href="https://docs.rs/nalgebra/0.25.0/nalgebra/base/alias/type.Vector2.html" title="type nalgebra::base::alias::Vector2">Vector2</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>>,
|
||||
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.has_updated_discord_rpc" class="structfield small-section-header"><a href="#structfield.has_updated_discord_rpc" class="anchor field"></a><code>has_updated_discord_rpc: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></code></span><span id="structfield.player" class="structfield small-section-header"><a href="#structfield.player" class="anchor field"></a><code>player: <a class="struct" href="../../model/player/struct.Player.html" title="struct game_logic::model::player::Player">Player</a></code></span><span id="structfield.world_map" class="structfield small-section-header"><a href="#structfield.world_map" class="anchor field"></a><code>world_map: <a class="struct" href="../../rendering/utilities/map_render/struct.MapRenderer.html" title="struct game_logic::rendering::utilities::map_render::MapRenderer">MapRenderer</a></code></span><span id="structfield.camera" class="structfield small-section-header"><a href="#structfield.camera" class="anchor field"></a><code>camera: Camera2D</code></span><span id="structfield.last_update" class="structfield small-section-header"><a href="#structfield.last_update" class="anchor field"></a><code>last_update: <a class="struct" href="https://doc.rust-lang.org/1.59.0/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a></code></span><span id="structfield.game_soundtrack" class="structfield small-section-header"><a href="#structfield.game_soundtrack" class="anchor field"></a><code>game_soundtrack: Music</code></span><span id="structfield.world_colliders" class="structfield small-section-header"><a href="#structfield.world_colliders" class="anchor field"></a><code>world_colliders: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../model/world_object/struct.ObjectCollider.html" title="struct game_logic::model::world_object::ObjectCollider">ObjectCollider</a>></code></span><span id="structfield.show_debug_info" class="structfield small-section-header"><a href="#structfield.show_debug_info" class="anchor field"></a><code>show_debug_info: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></code></span><span id="structfield.play_start_time" class="structfield small-section-header"><a href="#structfield.play_start_time" class="anchor field"></a><code>play_start_time: <a class="struct" href="https://docs.rs/chrono/latest/chrono/datetime/struct.DateTime.html" title="struct chrono::datetime::DateTime">DateTime</a><<a class="struct" href="https://docs.rs/chrono/latest/chrono/offset/utc/struct.Utc.html" title="struct chrono::offset::utc::Utc">Utc</a>></code></span><span id="structfield.player_start_position" class="structfield small-section-header"><a href="#structfield.player_start_position" class="anchor field"></a><code>player_start_position: <a class="type" href="https://docs.rs/nalgebra/0.25.0/nalgebra/base/alias/type.Vector2.html" title="type nalgebra::base::alias::Vector2">Vector2</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#36-398" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.PlayableScene.html" title="struct game_logic::scenes::player_interaction::PlayableScene">PlayableScene</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.new" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#38-80" title="goto source code">[src]</a></div><a href="#method.new" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(<br> raylib_handle: &mut RaylibHandle, <br> thread: &RaylibThread, <br> constants: &<a class="struct" href="../../project_constants/struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a><br>) -> Self</h4></div></summary><div class="docblock"><p>Construct a new <code>PlayableScene</code></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.render_frame" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#83-153" title="goto source code">[src]</a></div><a href="#method.render_frame" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.render_frame" class="fnname">render_frame</a>(<br> &mut self, <br> raylib: &mut RaylibHandle, <br> rl_thread: &RaylibThread, <br> discord: &Sender<<a class="enum" href="../../discord/signal/enum.DiscordRpcSignal.html" title="enum game_logic::discord::signal::DiscordRpcSignal">DiscordRpcSignal</a>>, <br> global_resources: &<a class="struct" href="../../global_resource_package/struct.GlobalResources.html" title="struct game_logic::global_resource_package::GlobalResources">GlobalResources</a>, <br> constants: &<a class="struct" href="../../project_constants/struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a>, <br> audio_subsystem: &mut RaylibAudio<br>) -> <a class="enum" href="../main_menu/enum.MenuStateSignal.html" title="enum game_logic::scenes::main_menu::MenuStateSignal">MenuStateSignal</a></h4></div></summary><div class="docblock"><p>Handler for each frame</p>
|
||||
</div></details><div id="method.draw_world" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#155-177" title="goto source code">[src]</a></div><a href="#method.draw_world" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw_world" class="fnname">draw_world</a>(<br> &mut self, <br> draw: &mut RaylibDrawHandle<'_>, <br> constants: &<a class="struct" href="../../project_constants/struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a><br>)</h4></div><div id="method.draw_ui" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#179-227" title="goto source code">[src]</a></div><a href="#method.draw_ui" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw_ui" class="fnname">draw_ui</a>(<br> &mut self, <br> draw: &mut RaylibDrawHandle<'_>, <br> constants: &<a class="struct" href="../../project_constants/struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a><br>)</h4></div><div id="method.update_physics" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#230-351" title="goto source code">[src]</a></div><a href="#method.update_physics" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.update_physics" class="fnname">update_physics</a>(<br> &mut self, <br> raylib: &RaylibHandle, <br> constants: &<a class="struct" href="../../project_constants/struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a><br>)</h4></div><div id="method.update_camera" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#354-397" title="goto source code">[src]</a></div><a href="#method.update_camera" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.update_camera" class="fnname">update_camera</a>(&mut self, raylib: &RaylibHandle)</h4></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#22" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.PlayableScene.html" title="struct game_logic::scenes::player_interaction::PlayableScene">PlayableScene</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#22" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.59.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.has_updated_discord_rpc" class="structfield small-section-header"><a href="#structfield.has_updated_discord_rpc" class="anchor field"></a><code>has_updated_discord_rpc: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></code></span><span id="structfield.player" class="structfield small-section-header"><a href="#structfield.player" class="anchor field"></a><code>player: <a class="struct" href="../../model/player/struct.Player.html" title="struct game_logic::model::player::Player">Player</a></code></span><span id="structfield.world_map" class="structfield small-section-header"><a href="#structfield.world_map" class="anchor field"></a><code>world_map: <a class="struct" href="../../rendering/utilities/map_render/struct.MapRenderer.html" title="struct game_logic::rendering::utilities::map_render::MapRenderer">MapRenderer</a></code></span><span id="structfield.camera" class="structfield small-section-header"><a href="#structfield.camera" class="anchor field"></a><code>camera: Camera2D</code></span><span id="structfield.last_update" class="structfield small-section-header"><a href="#structfield.last_update" class="anchor field"></a><code>last_update: <a class="struct" href="https://doc.rust-lang.org/1.59.0/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a></code></span><span id="structfield.game_soundtrack" class="structfield small-section-header"><a href="#structfield.game_soundtrack" class="anchor field"></a><code>game_soundtrack: Music</code></span><span id="structfield.world_colliders" class="structfield small-section-header"><a href="#structfield.world_colliders" class="anchor field"></a><code>world_colliders: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../model/world_object/struct.ObjectCollider.html" title="struct game_logic::model::world_object::ObjectCollider">ObjectCollider</a>></code></span><span id="structfield.show_debug_info" class="structfield small-section-header"><a href="#structfield.show_debug_info" class="anchor field"></a><code>show_debug_info: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></code></span><span id="structfield.play_start_time" class="structfield small-section-header"><a href="#structfield.play_start_time" class="anchor field"></a><code>play_start_time: <a class="struct" href="https://docs.rs/chrono/latest/chrono/datetime/struct.DateTime.html" title="struct chrono::datetime::DateTime">DateTime</a><<a class="struct" href="https://docs.rs/chrono/latest/chrono/offset/utc/struct.Utc.html" title="struct chrono::offset::utc::Utc">Utc</a>></code></span><span id="structfield.player_start_position" class="structfield small-section-header"><a href="#structfield.player_start_position" class="anchor field"></a><code>player_start_position: <a class="type" href="https://docs.rs/nalgebra/0.25.0/nalgebra/base/alias/type.Vector2.html" title="type nalgebra::base::alias::Vector2">Vector2</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#36-433" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.PlayableScene.html" title="struct game_logic::scenes::player_interaction::PlayableScene">PlayableScene</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.new" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#38-87" title="goto source code">[src]</a></div><a href="#method.new" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(<br> raylib_handle: &mut RaylibHandle, <br> thread: &RaylibThread, <br> constants: &<a class="struct" href="../../project_constants/struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a><br>) -> Self</h4></div></summary><div class="docblock"><p>Construct a new <code>PlayableScene</code></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.render_frame" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#90-165" title="goto source code">[src]</a></div><a href="#method.render_frame" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.render_frame" class="fnname">render_frame</a>(<br> &mut self, <br> raylib: &mut RaylibHandle, <br> rl_thread: &RaylibThread, <br> discord: &Sender<<a class="enum" href="../../discord/signal/enum.DiscordRpcSignal.html" title="enum game_logic::discord::signal::DiscordRpcSignal">DiscordRpcSignal</a>>, <br> global_resources: &<a class="struct" href="../../global_resource_package/struct.GlobalResources.html" title="struct game_logic::global_resource_package::GlobalResources">GlobalResources</a>, <br> constants: &<a class="struct" href="../../project_constants/struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a>, <br> audio_subsystem: &mut RaylibAudio<br>) -> <a class="enum" href="../main_menu/enum.MenuStateSignal.html" title="enum game_logic::scenes::main_menu::MenuStateSignal">MenuStateSignal</a></h4></div></summary><div class="docblock"><p>Handler for each frame</p>
|
||||
</div></details><div id="method.draw_world" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#167-189" title="goto source code">[src]</a></div><a href="#method.draw_world" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw_world" class="fnname">draw_world</a>(<br> &mut self, <br> draw: &mut RaylibDrawHandle<'_>, <br> constants: &<a class="struct" href="../../project_constants/struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a><br>)</h4></div><div id="method.draw_ui" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#191-253" title="goto source code">[src]</a></div><a href="#method.draw_ui" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw_ui" class="fnname">draw_ui</a>(<br> &mut self, <br> draw: &mut RaylibDrawHandle<'_>, <br> constants: &<a class="struct" href="../../project_constants/struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a><br>)</h4></div><div id="method.update_physics" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#256-386" title="goto source code">[src]</a></div><a href="#method.update_physics" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.update_physics" class="fnname">update_physics</a>(<br> &mut self, <br> raylib: &RaylibHandle, <br> constants: &<a class="struct" href="../../project_constants/struct.ProjectConstants.html" title="struct game_logic::project_constants::ProjectConstants">ProjectConstants</a><br>)</h4></div><div id="method.update_camera" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#389-432" title="goto source code">[src]</a></div><a href="#method.update_camera" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.update_camera" class="fnname">update_camera</a>(&mut self, raylib: &RaylibHandle)</h4></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#22" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.PlayableScene.html" title="struct game_logic::scenes::player_interaction::PlayableScene">PlayableScene</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/game_logic/scenes/player_interaction.rs.html#22" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.59.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.59.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></details></div></details></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"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.PlayableScene.html" title="struct game_logic::scenes::player_interaction::PlayableScene">PlayableScene</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.PlayableScene.html" title="struct game_logic::scenes::player_interaction::PlayableScene">PlayableScene</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.PlayableScene.html" title="struct game_logic::scenes::player_interaction::PlayableScene">PlayableScene</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.PlayableScene.html" title="struct game_logic::scenes::player_interaction::PlayableScene">PlayableScene</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.PlayableScene.html" title="struct game_logic::scenes::player_interaction::PlayableScene">PlayableScene</a></h3></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"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/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/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.59.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#209-214" title="goto source code">[src]</a></div><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/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/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#211" title="goto source code">[src]</a></div><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&</a>T</h4></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#218-222" title="goto source code">[src]</a></div><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/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/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#219" title="goto source code">[src]</a></div><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&mut </a>T</h4></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -22,27 +22,89 @@
|
||||
<span id="20">20</span>
|
||||
<span id="21">21</span>
|
||||
<span id="22">22</span>
|
||||
<span id="23">23</span>
|
||||
<span id="24">24</span>
|
||||
<span id="25">25</span>
|
||||
<span id="26">26</span>
|
||||
<span id="27">27</span>
|
||||
<span id="28">28</span>
|
||||
<span id="29">29</span>
|
||||
<span id="30">30</span>
|
||||
<span id="31">31</span>
|
||||
<span id="32">32</span>
|
||||
<span id="33">33</span>
|
||||
<span id="34">34</span>
|
||||
<span id="35">35</span>
|
||||
<span id="36">36</span>
|
||||
<span id="37">37</span>
|
||||
<span id="38">38</span>
|
||||
<span id="39">39</span>
|
||||
<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>
|
||||
<span id="47">47</span>
|
||||
<span id="48">48</span>
|
||||
<span id="49">49</span>
|
||||
<span id="50">50</span>
|
||||
<span id="51">51</span>
|
||||
<span id="52">52</span>
|
||||
<span id="53">53</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">nalgebra</span> <span class="kw">as</span> <span class="ident">na</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">raylib::prelude</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>)]</span>
|
||||
<span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::asset_manager::load_texture_from_internal_data</span>;
|
||||
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Player</span> {
|
||||
<span class="kw">pub</span> <span class="ident">position</span>: <span class="ident">na::Vector2</span><span class="op"><</span><span class="ident">f32</span><span class="op">></span>,
|
||||
<span class="kw">pub</span> <span class="ident">velocity</span>: <span class="ident">na::Vector2</span><span class="op"><</span><span class="ident">f32</span><span class="op">></span>,
|
||||
<span class="kw">pub</span> <span class="ident">size</span>: <span class="ident">f32</span>,
|
||||
<span class="kw">pub</span> <span class="ident">active_texture</span>: <span class="ident">i32</span>,
|
||||
<span class="kw">pub</span> <span class="ident">textures</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">Texture2D</span><span class="op">></span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Player</span> {
|
||||
|
||||
<span class="doccomment">/// Construct a new player.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">position</span>: <span class="ident">na::Vector2</span><span class="op"><</span><span class="ident">f32</span><span class="op">></span>) -> <span class="self">Self</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(
|
||||
<span class="ident">raylib_handle</span>: <span class="kw-2">&mut</span> <span class="ident">raylib::RaylibHandle</span>,
|
||||
<span class="ident">thread</span>: <span class="kw-2">&</span><span class="ident">raylib::RaylibThread</span>,
|
||||
<span class="ident">position</span>: <span class="ident">na::Vector2</span><span class="op"><</span><span class="ident">f32</span><span class="op">></span>,
|
||||
) -> <span class="self">Self</span> {
|
||||
<span class="comment">// Load all the textures</span>
|
||||
<span class="kw">let</span> <span class="ident">textures</span> <span class="op">=</span> <span class="macro">vec!</span>[
|
||||
<span class="ident">load_texture_from_internal_data</span>(
|
||||
<span class="ident">raylib_handle</span>,
|
||||
<span class="ident">thread</span>,
|
||||
<span class="string">"assets/chr/chr_cubee/chr_cubeeLarge.png"</span>,
|
||||
)
|
||||
.<span class="ident">unwrap</span>(),
|
||||
<span class="ident">load_texture_from_internal_data</span>(
|
||||
<span class="ident">raylib_handle</span>,
|
||||
<span class="ident">thread</span>,
|
||||
<span class="string">"assets/chr/chr_cubee/chr_cubeeMedium.png"</span>,
|
||||
)
|
||||
.<span class="ident">unwrap</span>(),
|
||||
<span class="ident">load_texture_from_internal_data</span>(
|
||||
<span class="ident">raylib_handle</span>,
|
||||
<span class="ident">thread</span>,
|
||||
<span class="string">"assets/chr/chr_cubee/chr_cubeeSmall.png"</span>,
|
||||
)
|
||||
.<span class="ident">unwrap</span>(),
|
||||
];
|
||||
|
||||
<span class="self">Self</span> {
|
||||
<span class="ident">position</span>,
|
||||
<span class="ident">velocity</span>: <span class="ident">na::Vector2::zeros</span>(),
|
||||
<span class="ident">size</span>: <span class="number">1.0</span>,
|
||||
<span class="ident">size</span>: <span class="number">1.0</span>,
|
||||
<span class="ident">active_texture</span>: <span class="number">0</span>,
|
||||
<span class="ident">textures</span>,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</code></pre></div>
|
||||
</section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game_logic" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.59.0 (9d1b2106e 2022-02-23)" ></div>
|
||||
|
@ -68,6 +68,9 @@
|
||||
<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>
|
||||
</pre><pre class="rust"><code><span class="doccomment">//! The rust side of the `dist/project-constants.json` file</span>
|
||||
<span class="doccomment">//! </span>
|
||||
<span class="doccomment">//! ## Overview</span>
|
||||
@ -113,6 +116,9 @@
|
||||
|
||||
<span class="doccomment">/// Starting size of player in tiles</span>
|
||||
<span class="kw">pub</span> <span class="ident">start_size</span>: <span class="ident">f32</span>,
|
||||
|
||||
<span class="doccomment">/// Base melting speed in percent per second</span>
|
||||
<span class="kw">pub</span> <span class="ident">melt_speed</span>: <span class="ident">f32</span>,
|
||||
}
|
||||
|
||||
<span class="doccomment">/// This structure is filled with the contents of `dist/project-constants.json` at runtime</span>
|
||||
|
@ -398,6 +398,41 @@
|
||||
<span id="396">396</span>
|
||||
<span id="397">397</span>
|
||||
<span id="398">398</span>
|
||||
<span id="399">399</span>
|
||||
<span id="400">400</span>
|
||||
<span id="401">401</span>
|
||||
<span id="402">402</span>
|
||||
<span id="403">403</span>
|
||||
<span id="404">404</span>
|
||||
<span id="405">405</span>
|
||||
<span id="406">406</span>
|
||||
<span id="407">407</span>
|
||||
<span id="408">408</span>
|
||||
<span id="409">409</span>
|
||||
<span id="410">410</span>
|
||||
<span id="411">411</span>
|
||||
<span id="412">412</span>
|
||||
<span id="413">413</span>
|
||||
<span id="414">414</span>
|
||||
<span id="415">415</span>
|
||||
<span id="416">416</span>
|
||||
<span id="417">417</span>
|
||||
<span id="418">418</span>
|
||||
<span id="419">419</span>
|
||||
<span id="420">420</span>
|
||||
<span id="421">421</span>
|
||||
<span id="422">422</span>
|
||||
<span id="423">423</span>
|
||||
<span id="424">424</span>
|
||||
<span id="425">425</span>
|
||||
<span id="426">426</span>
|
||||
<span id="427">427</span>
|
||||
<span id="428">428</span>
|
||||
<span id="429">429</span>
|
||||
<span id="430">430</span>
|
||||
<span id="431">431</span>
|
||||
<span id="432">432</span>
|
||||
<span id="433">433</span>
|
||||
</pre><pre class="rust"><code><span class="doccomment">//! This scene encompasses all of the game where the player can walk around.</span>
|
||||
|
||||
<span class="kw">use</span> <span class="ident">chrono</span>::{<span class="ident">DateTime</span>, <span class="ident">Utc</span>};
|
||||
@ -460,18 +495,25 @@
|
||||
<span class="kw">let</span> <span class="ident">game_soundtrack</span> <span class="op">=</span>
|
||||
<span class="ident">load_music_from_internal_data</span>(<span class="ident">thread</span>, <span class="string">"assets/audio/gameSoundtrack.mp3"</span>).<span class="ident">unwrap</span>();
|
||||
|
||||
<span class="comment">// Load the player</span>
|
||||
<span class="kw">let</span> <span class="ident">player</span> <span class="op">=</span> <span class="ident">Player::new</span>(
|
||||
<span class="ident">raylib_handle</span>,
|
||||
<span class="ident">thread</span>,
|
||||
<span class="ident">player_start_position</span>,
|
||||
);
|
||||
|
||||
<span class="self">Self</span> {
|
||||
<span class="ident">has_updated_discord_rpc</span>: <span class="bool-val">false</span>,
|
||||
<span class="ident">player_start_position</span>,
|
||||
<span class="ident">player</span>: <span class="ident">Player::new</span>(<span class="ident">player_start_position</span>),
|
||||
<span class="ident">world_map</span>: <span class="ident">map_renderer</span>,
|
||||
<span class="ident">player</span>,
|
||||
<span class="ident">camera</span>: <span class="ident">raylib::camera::Camera2D</span> {
|
||||
<span class="ident">target</span>: <span class="ident">raylib::math::Vector2</span> { <span class="ident">x</span>: <span class="number">0.0</span>, <span class="ident">y</span>: <span class="number">0.0</span> },
|
||||
<span class="ident">offset</span>: <span class="ident">raylib::math::Vector2</span> { <span class="ident">x</span>: <span class="number">0.0</span>, <span class="ident">y</span>: <span class="number">0.0</span> },
|
||||
<span class="ident">rotation</span>: <span class="number">0.0</span>,
|
||||
<span class="ident">zoom</span>: <span class="number">1.0</span>,
|
||||
},
|
||||
<span class="ident">last_update</span>: <span class="ident">SystemTime::UNIX_EPOCH</span>,
|
||||
<span class="ident">last_update</span>: <span class="ident">SystemTime::now</span>(),
|
||||
<span class="ident">game_soundtrack</span>,
|
||||
<span class="ident">world_colliders</span>,
|
||||
<span class="ident">show_debug_info</span>: <span class="bool-val">false</span>,
|
||||
@ -527,13 +569,18 @@
|
||||
<span class="self">self</span>.<span class="ident">draw_ui</span>(<span class="kw-2">&mut</span> <span class="ident">draw</span>, <span class="ident">constants</span>);
|
||||
|
||||
<span class="comment">// NOTE: If you want to trigger a cutscene, do it here by using one of:</span>
|
||||
<span class="comment">// return MenuStateSignal::DoMeltedDeathCutscene {</span>
|
||||
<span class="comment">// playtime: Utc::now().signed_duration_since(self.play_start_time),</span>
|
||||
<span class="comment">// };</span>
|
||||
|
||||
<span class="comment">// return MenuStateSignal::DoOceanCutscene {</span>
|
||||
<span class="comment">// playtime: Utc::now().signed_duration_since(self.play_start_time),</span>
|
||||
<span class="comment">// };</span>
|
||||
|
||||
<span class="comment">// Handle Losing</span>
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">player</span>.<span class="ident">size</span> <span class="op"><</span> <span class="number">0.15</span> {
|
||||
<span class="kw">return</span> <span class="ident">MenuStateSignal::DoMeltedDeathCutscene</span> {
|
||||
<span class="ident">playtime</span>: <span class="ident">Utc::now</span>().<span class="ident">signed_duration_since</span>(<span class="self">self</span>.<span class="ident">play_start_time</span>),
|
||||
};
|
||||
}
|
||||
|
||||
<span class="comment">// Handle winning</span>
|
||||
<span class="kw">if</span> <span class="self">self</span>
|
||||
.<span class="ident">world_map</span>
|
||||
@ -581,6 +628,14 @@
|
||||
<span class="kw">let</span> <span class="ident">mouse_x</span> <span class="op">=</span> <span class="ident">draw</span>.<span class="ident">get_mouse_x</span>();
|
||||
<span class="kw">let</span> <span class="ident">mouse_y</span> <span class="op">=</span> <span class="ident">draw</span>.<span class="ident">get_mouse_y</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="ident">current_temperature</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">world_map</span>.<span class="ident">sample_temperature_at</span>(
|
||||
<span class="self">self</span>.<span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">component_mul</span>(<span class="kw-2">&</span><span class="ident">na::Vector2::new</span>(<span class="number">1.0</span>, <span class="op">-</span><span class="number">1.0</span>))
|
||||
);
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">current_temperature_val</span>: <span class="ident">f32</span> <span class="op">=</span> <span class="op">-</span><span class="number">247.51879</span>;
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">val</span>) <span class="op">=</span> <span class="ident">current_temperature</span> {
|
||||
<span class="ident">current_temperature_val</span> <span class="op">=</span> <span class="ident">val</span>;
|
||||
}
|
||||
|
||||
<span class="comment">// Optionally display debug info</span>
|
||||
<span class="kw">if</span> <span class="ident">draw</span>.<span class="ident">is_key_pressed</span>(<span class="ident">KeyboardKey::KEY_F3</span>) {
|
||||
<span class="self">self</span>.<span class="ident">show_debug_info</span> <span class="op">=</span> <span class="op">!</span><span class="self">self</span>.<span class="ident">show_debug_info</span>;
|
||||
@ -624,6 +679,12 @@
|
||||
<span class="comment">// 32,</span>
|
||||
<span class="comment">// Color::BLACK,</span>
|
||||
<span class="comment">// );</span>
|
||||
<span class="kw">let</span> <span class="ident">melt_amount</span> <span class="op">=</span> (<span class="ident">current_temperature_val</span>)<span class="op">/</span>(<span class="op">-</span><span class="number">247.51879</span>);
|
||||
|
||||
<span class="ident">draw</span>.<span class="ident">draw_text</span>(
|
||||
<span class="macro">format!</span>(<span class="string">"Funny Temperature: ({})[{}]"</span>, <span class="ident">current_temperature_val</span>, <span class="ident">melt_amount</span>).<span class="ident">as_str</span>(),
|
||||
<span class="number">10</span>, <span class="number">10</span>, <span class="number">20</span>, <span class="ident">Color::PAPAYAWHIP</span>
|
||||
);
|
||||
}
|
||||
|
||||
<span class="comment">// Physics</span>
|
||||
@ -642,11 +703,11 @@
|
||||
|
||||
<span class="kw">let</span> <span class="ident">player</span> <span class="op">=</span> <span class="kw-2">&mut</span> <span class="self">self</span>.<span class="ident">player</span>;
|
||||
|
||||
<span class="comment">// NOTE: This is how to check friction and temperature</span>
|
||||
<span class="kw">let</span> <span class="ident">current_friction</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">world_map</span>.<span class="ident">sample_friction_at</span>(<span class="ident">player</span>.<span class="ident">position</span>);
|
||||
<span class="kw">let</span> <span class="ident">current_temperature</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">world_map</span>.<span class="ident">sample_temperature_at</span>(<span class="ident">player</span>.<span class="ident">position</span>);
|
||||
<span class="kw">let</span> <span class="ident">current_temperature</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">world_map</span>.<span class="ident">sample_temperature_at</span>(
|
||||
<span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">component_mul</span>(<span class="kw-2">&</span><span class="ident">na::Vector2::new</span>(<span class="number">1.0</span>, <span class="op">-</span><span class="number">1.0</span>))
|
||||
);
|
||||
<span class="kw">let</span> <span class="ident">map_size</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">world_map</span>.<span class="ident">get_map_size</span>();
|
||||
<span class="comment">// TODO: You can access the colission list with: self.world_colliders</span>
|
||||
|
||||
<span class="comment">// Get input direction components</span>
|
||||
<span class="kw">let</span> <span class="ident">h_axis</span> <span class="op">=</span> <span class="ident">raylib</span>.<span class="ident">is_key_down</span>(<span class="ident">KeyboardKey::KEY_D</span>) <span class="kw">as</span> <span class="ident">i8</span>
|
||||
@ -747,6 +808,15 @@
|
||||
<span class="ident">player</span>.<span class="ident">velocity</span>.<span class="ident">y</span> <span class="op">=</span> <span class="number">0.0</span>;
|
||||
}
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">current_temperature_val</span>: <span class="ident">f32</span> <span class="op">=</span> <span class="op">-</span><span class="number">247.51879</span>;
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">val</span>) <span class="op">=</span> <span class="ident">current_temperature</span> {
|
||||
<span class="ident">current_temperature_val</span> <span class="op">=</span> <span class="ident">val</span> <span class="op">-</span> <span class="number">273.15</span>;
|
||||
}
|
||||
|
||||
<span class="kw">let</span> <span class="ident">melt_amount</span> <span class="op">=</span> <span class="ident">constants</span>.<span class="ident">player</span>.<span class="ident">melt_speed</span> <span class="op">*</span> (<span class="ident">current_temperature_val</span>)<span class="op">/</span>(<span class="op">-</span><span class="number">247.51879</span>);
|
||||
|
||||
<span class="ident">player</span>.<span class="ident">size</span> <span class="op">-</span><span class="op">=</span> <span class="ident">melt_amount</span> <span class="op">*</span> <span class="ident">delta_time</span>;
|
||||
|
||||
<span class="self">self</span>.<span class="ident">update_camera</span>(<span class="ident">raylib</span>);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user