deploy: 4f8f03a3dcd0dcd7d6ae22ad927b1ce303ff1347
This commit is contained in:
parent
a05e2f686e
commit
6dabc51f03
@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `map_render` mod in crate `game_logic`."><meta name="keywords" content="rust, rustlang, rust-lang, map_render"><title>game_logic::rendering::utilities::map_render - 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 map_render</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><div id="sidebar-vars" data-name="map_render" 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">rendering</a>::<wbr><a href="../index.html">utilities</a>::<wbr><a class="mod" href="#">map_render</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/rendering/utilities/map_render.rs.html#1-615" 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 map_render</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><div id="sidebar-vars" data-name="map_render" 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">rendering</a>::<wbr><a href="../index.html">utilities</a>::<wbr><a class="mod" href="#">map_render</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/rendering/utilities/map_render.rs.html#1-624" 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.MapRenderer.html" title="game_logic::rendering::utilities::map_render::MapRenderer struct">MapRenderer</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ProgramDataTileCache.html" title="game_logic::rendering::utilities::map_render::ProgramDataTileCache struct">ProgramDataTileCache</a></div><div class="item-right docblock-short"></div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.MapRenderError.html" title="game_logic::rendering::utilities::map_render::MapRenderError enum">MapRenderError</a></div><div class="item-right docblock-short"><p>Possible errors generated by the map loading process</p>
|
||||
</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>
|
||||
|
@ -6,10 +6,10 @@
|
||||
world_objects: <a class="struct" href="../../../model/world_object_package/struct.WorldObjectPackage.html" title="struct game_logic::model::world_object_package::WorldObjectPackage">WorldObjectPackage</a>,
|
||||
world_end: <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.i32.html">i32</a>>,
|
||||
cup_icon: Texture2D,
|
||||
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.map" class="structfield small-section-header"><a href="#structfield.map" class="anchor field"></a><code>map: Map</code></span><span id="structfield.tile_textures" class="structfield small-section-header"><a href="#structfield.tile_textures" class="anchor field"></a><code>tile_textures: <a class="struct" href="https://doc.rust-lang.org/1.59.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>, Texture2D></code></span><span id="structfield.world_objects" class="structfield small-section-header"><a href="#structfield.world_objects" class="anchor field"></a><code>world_objects: <a class="struct" href="../../../model/world_object_package/struct.WorldObjectPackage.html" title="struct game_logic::model::world_object_package::WorldObjectPackage">WorldObjectPackage</a></code></span><span id="structfield.world_end" class="structfield small-section-header"><a href="#structfield.world_end" class="anchor field"></a><code>world_end: <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.i32.html">i32</a>></code></span><span id="structfield.cup_icon" class="structfield small-section-header"><a href="#structfield.cup_icon" class="anchor field"></a><code>cup_icon: 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/rendering/utilities/map_render.rs.html#86-615" 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.MapRenderer.html" title="struct game_logic::rendering::utilities::map_render::MapRenderer">MapRenderer</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/rendering/utilities/map_render.rs.html#88-146" 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> tmx_path: &<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>, <br> objects_path: &<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>, <br> end_path: &<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>, <br> raylib: &mut RaylibHandle, <br> raylib_thread: &RaylibThread<br>) -> <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, <a class="enum" href="enum.MapRenderError.html" title="enum game_logic::rendering::utilities::map_render::MapRenderError">MapRenderError</a>></h4></div></summary><div class="docblock"><p>Construct a new MapRenderer.</p>
|
||||
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.map" class="structfield small-section-header"><a href="#structfield.map" class="anchor field"></a><code>map: Map</code></span><span id="structfield.tile_textures" class="structfield small-section-header"><a href="#structfield.tile_textures" class="anchor field"></a><code>tile_textures: <a class="struct" href="https://doc.rust-lang.org/1.59.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>, Texture2D></code></span><span id="structfield.world_objects" class="structfield small-section-header"><a href="#structfield.world_objects" class="anchor field"></a><code>world_objects: <a class="struct" href="../../../model/world_object_package/struct.WorldObjectPackage.html" title="struct game_logic::model::world_object_package::WorldObjectPackage">WorldObjectPackage</a></code></span><span id="structfield.world_end" class="structfield small-section-header"><a href="#structfield.world_end" class="anchor field"></a><code>world_end: <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.i32.html">i32</a>></code></span><span id="structfield.cup_icon" class="structfield small-section-header"><a href="#structfield.cup_icon" class="anchor field"></a><code>cup_icon: 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/rendering/utilities/map_render.rs.html#86-624" 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.MapRenderer.html" title="struct game_logic::rendering::utilities::map_render::MapRenderer">MapRenderer</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/rendering/utilities/map_render.rs.html#88-146" 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> tmx_path: &<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>, <br> objects_path: &<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>, <br> end_path: &<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>, <br> raylib: &mut RaylibHandle, <br> raylib_thread: &RaylibThread<br>) -> <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, <a class="enum" href="enum.MapRenderError.html" title="enum game_logic::rendering::utilities::map_render::MapRenderError">MapRenderError</a>></h4></div></summary><div class="docblock"><p>Construct a new MapRenderer.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_map_size" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#149-154" title="goto source code">[src]</a></div><a href="#method.get_map_size" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_map_size" class="fnname">get_map_size</a>(&self) -> <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>></h4></div></summary><div class="docblock"><p>Gets the map size</p>
|
||||
</div></details><div id="method.sample_friction_at" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#156-209" title="goto source code">[src]</a></div><a href="#method.sample_friction_at" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.sample_friction_at" class="fnname">sample_friction_at</a>(&self, world_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>>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>></h4></div><div id="method.sample_temperature_at" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#211-264" title="goto source code">[src]</a></div><a href="#method.sample_temperature_at" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.sample_temperature_at" class="fnname">sample_temperature_at</a>(&self, world_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>>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>></h4></div><div id="method.render_map" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#266-509" title="goto source code">[src]</a></div><a href="#method.render_map" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.render_map" class="fnname">render_map</a>(<br> &mut self, <br> draw_handle: &mut RaylibMode2D<'_, RaylibDrawHandle<'_>>, <br> camera: &Camera2D, <br> show_debug_grid: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>, <br> player_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>)</h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_world_colliders" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#512-514" title="goto source code">[src]</a></div><a href="#method.get_world_colliders" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_world_colliders" class="fnname">get_world_colliders</a>(&self) -> <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>></h4></div></summary><div class="docblock"><p>Get the list of world colliders</p>
|
||||
</div></details><div id="method.is_point_inside_win_zone" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#516-524" title="goto source code">[src]</a></div><a href="#method.is_point_inside_win_zone" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_point_inside_win_zone" class="fnname">is_point_inside_win_zone</a>(&self, 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>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div><div id="method.get_screenspace_vector_to_win_zone" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#526-542" title="goto source code">[src]</a></div><a href="#method.get_screenspace_vector_to_win_zone" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_screenspace_vector_to_win_zone" class="fnname">get_screenspace_vector_to_win_zone</a>(<br> &self, <br> draw: &mut RaylibDrawHandle<'_>, <br> screen_center: <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> camera: &Camera2D<br>) -> <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>></h4></div><div id="method.render_hud_endgoal_arrow" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#544-614" title="goto source code">[src]</a></div><a href="#method.render_hud_endgoal_arrow" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.render_hud_endgoal_arrow" class="fnname">render_hud_endgoal_arrow</a>(<br> &self, <br> draw: &mut RaylibDrawHandle<'_>, <br> player_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> camera: &Camera2D<br>)</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/rendering/utilities/map_render.rs.html#77" 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.MapRenderer.html" title="struct game_logic::rendering::utilities::map_render::MapRenderer">MapRenderer</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/rendering/utilities/map_render.rs.html#77" 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 id="method.sample_friction_at" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#156-209" title="goto source code">[src]</a></div><a href="#method.sample_friction_at" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.sample_friction_at" class="fnname">sample_friction_at</a>(&self, world_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>>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>></h4></div><div id="method.sample_temperature_at" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#211-264" title="goto source code">[src]</a></div><a href="#method.sample_temperature_at" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.sample_temperature_at" class="fnname">sample_temperature_at</a>(&self, world_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>>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.f32.html">f32</a>></h4></div><div id="method.render_map" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#266-518" title="goto source code">[src]</a></div><a href="#method.render_map" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.render_map" class="fnname">render_map</a>(<br> &mut self, <br> draw_handle: &mut RaylibMode2D<'_, RaylibDrawHandle<'_>>, <br> camera: &Camera2D, <br> show_debug_grid: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a>, <br> player_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>)</h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_world_colliders" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#521-523" title="goto source code">[src]</a></div><a href="#method.get_world_colliders" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_world_colliders" class="fnname">get_world_colliders</a>(&self) -> <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>></h4></div></summary><div class="docblock"><p>Get the list of world colliders</p>
|
||||
</div></details><div id="method.is_point_inside_win_zone" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#525-533" title="goto source code">[src]</a></div><a href="#method.is_point_inside_win_zone" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_point_inside_win_zone" class="fnname">is_point_inside_win_zone</a>(&self, 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>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div><div id="method.get_screenspace_vector_to_win_zone" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#535-551" title="goto source code">[src]</a></div><a href="#method.get_screenspace_vector_to_win_zone" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_screenspace_vector_to_win_zone" class="fnname">get_screenspace_vector_to_win_zone</a>(<br> &self, <br> draw: &mut RaylibDrawHandle<'_>, <br> screen_center: <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> camera: &Camera2D<br>) -> <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>></h4></div><div id="method.render_hud_endgoal_arrow" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../../src/game_logic/rendering/utilities/map_render.rs.html#553-623" title="goto source code">[src]</a></div><a href="#method.render_hud_endgoal_arrow" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.render_hud_endgoal_arrow" class="fnname">render_hud_endgoal_arrow</a>(<br> &self, <br> draw: &mut RaylibDrawHandle<'_>, <br> player_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> camera: &Camera2D<br>)</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/rendering/utilities/map_render.rs.html#77" 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.MapRenderer.html" title="struct game_logic::rendering::utilities::map_render::MapRenderer">MapRenderer</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/rendering/utilities/map_render.rs.html#77" 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.MapRenderer.html" title="struct game_logic::rendering::utilities::map_render::MapRenderer">MapRenderer</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.MapRenderer.html" title="struct game_logic::rendering::utilities::map_render::MapRenderer">MapRenderer</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.MapRenderer.html" title="struct game_logic::rendering::utilities::map_render::MapRenderer">MapRenderer</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.MapRenderer.html" title="struct game_logic::rendering::utilities::map_render::MapRenderer">MapRenderer</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.MapRenderer.html" title="struct game_logic::rendering::utilities::map_render::MapRenderer">MapRenderer</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>
|
||||
|
@ -615,6 +615,15 @@
|
||||
<span id="613">613</span>
|
||||
<span id="614">614</span>
|
||||
<span id="615">615</span>
|
||||
<span id="616">616</span>
|
||||
<span id="617">617</span>
|
||||
<span id="618">618</span>
|
||||
<span id="619">619</span>
|
||||
<span id="620">620</span>
|
||||
<span id="621">621</span>
|
||||
<span id="622">622</span>
|
||||
<span id="623">623</span>
|
||||
<span id="624">624</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std</span>::{<span class="ident">collections::HashMap</span>, <span class="ident">path::PathBuf</span>, <span class="ident">sync::Arc</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::{
|
||||
@ -1120,6 +1129,15 @@
|
||||
<span class="ident">draw_handle</span>.<span class="ident">draw_pixel</span>(<span class="ident">x</span> <span class="kw">as</span> <span class="ident">i32</span>, <span class="ident">y</span> <span class="kw">as</span> <span class="ident">i32</span>, <span class="ident">Color::BLUE</span>);
|
||||
}
|
||||
}
|
||||
<span class="comment">// for collider in &self.world_objects.world_space_colliders {</span>
|
||||
<span class="comment">// draw_handle.draw_rectangle_lines(</span>
|
||||
<span class="comment">// (collider.position.x-collider.size.x/2.0) as i32,</span>
|
||||
<span class="comment">// -(collider.position.y+collider.size.y/2.0) as i32,</span>
|
||||
<span class="comment">// collider.size.x as i32,</span>
|
||||
<span class="comment">// collider.size.y as i32,</span>
|
||||
<span class="comment">// Color::BLUEVIOLET,</span>
|
||||
<span class="comment">// );</span>
|
||||
<span class="comment">// }</span>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -750,9 +750,9 @@
|
||||
|
||||
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">world_colliders</span> {
|
||||
<span class="kw">if</span> <span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">x</span> <span class="op">-</span> <span class="ident">player_size</span> <span class="op"><</span><span class="op">=</span> <span class="ident">i</span>.<span class="ident">position</span>.<span class="ident">x</span> <span class="op">+</span> <span class="ident">i</span>.<span class="ident">size</span>.<span class="ident">x</span> <span class="op">/</span> <span class="number">2.0</span>
|
||||
<span class="op">&&</span> <span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">x</span> <span class="op">+</span> <span class="ident">player_size</span> <span class="op">></span><span class="op">=</span> <span class="ident">i</span>.<span class="ident">position</span>.<span class="ident">x</span> <span class="op">+</span> <span class="ident">i</span>.<span class="ident">size</span>.<span class="ident">x</span> <span class="op">/</span> <span class="number">2.0</span>
|
||||
<span class="op">&&</span> <span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">x</span> <span class="op">+</span> <span class="ident">player_size</span> <span class="op">></span><span class="op">=</span> <span class="ident">i</span>.<span class="ident">position</span>.<span class="ident">x</span> <span class="op">-</span> <span class="ident">i</span>.<span class="ident">size</span>.<span class="ident">x</span> <span class="op">/</span> <span class="number">2.0</span>
|
||||
<span class="op">&&</span> <span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">y</span> <span class="op">-</span> <span class="ident">player_size</span> <span class="op"><</span><span class="op">=</span> <span class="ident">i</span>.<span class="ident">position</span>.<span class="ident">y</span> <span class="op">+</span> <span class="ident">i</span>.<span class="ident">size</span>.<span class="ident">y</span> <span class="op">/</span> <span class="number">2.0</span>
|
||||
<span class="op">&&</span> <span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">y</span> <span class="op">+</span> <span class="ident">player_size</span> <span class="op">></span><span class="op">=</span> <span class="ident">i</span>.<span class="ident">position</span>.<span class="ident">y</span> <span class="op">+</span> <span class="ident">i</span>.<span class="ident">size</span>.<span class="ident">y</span> <span class="op">/</span> <span class="number">2.0</span>
|
||||
<span class="op">&&</span> <span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">y</span> <span class="op">+</span> <span class="ident">player_size</span> <span class="op">></span><span class="op">=</span> <span class="ident">i</span>.<span class="ident">position</span>.<span class="ident">y</span> <span class="op">-</span> <span class="ident">i</span>.<span class="ident">size</span>.<span class="ident">y</span> <span class="op">/</span> <span class="number">2.0</span>
|
||||
{
|
||||
<span class="comment">// if player.velocity.x < 0.0 {</span>
|
||||
<span class="comment">// player.position.x = i.position.x + i.size.x / 2.0 + player_size;</span>
|
||||
@ -781,9 +781,9 @@
|
||||
|
||||
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">world_colliders</span> {
|
||||
<span class="kw">if</span> <span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">x</span> <span class="op">-</span> <span class="ident">player_size</span> <span class="op"><</span><span class="op">=</span> <span class="ident">i</span>.<span class="ident">position</span>.<span class="ident">x</span> <span class="op">+</span> <span class="ident">i</span>.<span class="ident">size</span>.<span class="ident">x</span> <span class="op">/</span> <span class="number">2.0</span>
|
||||
<span class="op">&&</span> <span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">x</span> <span class="op">+</span> <span class="ident">player_size</span> <span class="op">></span><span class="op">=</span> <span class="ident">i</span>.<span class="ident">position</span>.<span class="ident">x</span> <span class="op">+</span> <span class="ident">i</span>.<span class="ident">size</span>.<span class="ident">x</span> <span class="op">/</span> <span class="number">2.0</span>
|
||||
<span class="op">&&</span> <span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">y</span> <span class="op">-</span> <span class="ident">player_size</span> <span class="op"><</span><span class="op">=</span> <span class="ident">i</span>.<span class="ident">position</span>.<span class="ident">y</span> <span class="op">+</span> <span class="ident">i</span>.<span class="ident">size</span>.<span class="ident">y</span> <span class="op">/</span> <span class="number">2.0</span>
|
||||
<span class="op">&&</span> <span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">y</span> <span class="op">+</span> <span class="ident">player_size</span> <span class="op">></span><span class="op">=</span> <span class="ident">i</span>.<span class="ident">position</span>.<span class="ident">y</span> <span class="op">+</span> <span class="ident">i</span>.<span class="ident">size</span>.<span class="ident">y</span> <span class="op">/</span> <span class="number">2.0</span>
|
||||
<span class="op">&&</span> <span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">x</span> <span class="op">+</span> <span class="ident">player_size</span> <span class="op">></span><span class="op">=</span> <span class="ident">i</span>.<span class="ident">position</span>.<span class="ident">x</span> <span class="op">-</span> <span class="ident">i</span>.<span class="ident">size</span>.<span class="ident">x</span> <span class="op">/</span> <span class="number">2.0</span>
|
||||
<span class="op">&&</span> <span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">y</span> <span class="op">-</span> <span class="ident">player_size</span> <span class="op"><</span><span class="op">=</span> <span class="ident">i</span>.<span class="ident">position</span>.<span class="ident">y</span> <span class="op">+</span> <span class="ident">i</span>.<span class="ident">size</span>.<span class="ident">y</span> <span class="op">/</span> <span class="number">2.0</span>
|
||||
<span class="op">&&</span> <span class="ident">player</span>.<span class="ident">position</span>.<span class="ident">y</span> <span class="op">+</span> <span class="ident">player_size</span> <span class="op">></span><span class="op">=</span> <span class="ident">i</span>.<span class="ident">position</span>.<span class="ident">y</span> <span class="op">-</span> <span class="ident">i</span>.<span class="ident">size</span>.<span class="ident">y</span> <span class="op">/</span> <span class="number">2.0</span>
|
||||
{
|
||||
<span class="comment">// if player.velocity.y < 0.0 {</span>
|
||||
<span class="comment">// player.position.y = i.position.y + i.size.y / 2.0 + player_size;</span>
|
||||
|
Reference in New Issue
Block a user