From 6dabc51f03caf75fc9362b2c7fde8f5cec602f4e Mon Sep 17 00:00:00 2001 From: Ewpratten Date: Mon, 4 Apr 2022 04:52:56 +0000 Subject: [PATCH] deploy: 4f8f03a3dcd0dcd7d6ae22ad927b1ce303ff1347 --- .../rendering/utilities/map_render/index.html | 2 +- .../map_render/struct.MapRenderer.html | 6 +++--- .../rendering/utilities/map_render.rs.html | 18 ++++++++++++++++++ .../scenes/player_interaction.rs.html | 10 +++++----- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/rustdoc/game_logic/rendering/utilities/map_render/index.html b/rustdoc/game_logic/rendering/utilities/map_render/index.html index 7cb35c80..365ab1e6 100644 --- a/rustdoc/game_logic/rendering/utilities/map_render/index.html +++ b/rustdoc/game_logic/rendering/utilities/map_render/index.html @@ -1,6 +1,6 @@ game_logic::rendering::utilities::map_render - Rust

Module game_logic::rendering::utilities::map_render[][src]

Structs

+

Module map_render

Module game_logic::rendering::utilities::map_render[][src]

Structs

Enums

Possible errors generated by the map loading process

diff --git a/rustdoc/game_logic/rendering/utilities/map_render/struct.MapRenderer.html b/rustdoc/game_logic/rendering/utilities/map_render/struct.MapRenderer.html index 7099a746..4603bed8 100644 --- a/rustdoc/game_logic/rendering/utilities/map_render/struct.MapRenderer.html +++ b/rustdoc/game_logic/rendering/utilities/map_render/struct.MapRenderer.html @@ -6,10 +6,10 @@ world_objects: WorldObjectPackage, world_end: Vector2<i32>, cup_icon: Texture2D, -}

Fields

map: Maptile_textures: HashMap<PathBuf, Texture2D>world_objects: WorldObjectPackageworld_end: Vector2<i32>cup_icon: Texture2D

Implementations

Construct a new MapRenderer.

+}

Fields

map: Maptile_textures: HashMap<PathBuf, Texture2D>world_objects: WorldObjectPackageworld_end: Vector2<i32>cup_icon: Texture2D

Implementations

Construct a new MapRenderer.

Gets the map size

-

Get the list of world colliders

-

Trait Implementations

Formats the value using the given formatter. Read more

+

Get the list of world colliders

+

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

diff --git a/rustdoc/src/game_logic/rendering/utilities/map_render.rs.html b/rustdoc/src/game_logic/rendering/utilities/map_render.rs.html index 35ed2436..73941750 100644 --- a/rustdoc/src/game_logic/rendering/utilities/map_render.rs.html +++ b/rustdoc/src/game_logic/rendering/utilities/map_render.rs.html @@ -615,6 +615,15 @@ 613 614 615 +616 +617 +618 +619 +620 +621 +622 +623 +624
use std::{collections::HashMap, path::PathBuf, sync::Arc};
 
 use crate::{
@@ -1120,6 +1129,15 @@
                             draw_handle.draw_pixel(x as i32, y as i32, Color::BLUE);
                         }
                     }
+                    // for collider in &self.world_objects.world_space_colliders {
+                    //     draw_handle.draw_rectangle_lines(
+                    //         (collider.position.x-collider.size.x/2.0) as i32,
+                    //         -(collider.position.y+collider.size.y/2.0) as i32,
+                    //         collider.size.x as i32,
+                    //         collider.size.y as i32,
+                    //         Color::BLUEVIOLET,
+                    //     );
+                    // }
                 }
             }
         }
diff --git a/rustdoc/src/game_logic/scenes/player_interaction.rs.html b/rustdoc/src/game_logic/scenes/player_interaction.rs.html
index 9565d1e2..e965ca30 100644
--- a/rustdoc/src/game_logic/scenes/player_interaction.rs.html
+++ b/rustdoc/src/game_logic/scenes/player_interaction.rs.html
@@ -750,9 +750,9 @@
 
         for i in &self.world_colliders {
             if player.position.x - player_size <= i.position.x + i.size.x / 2.0
-                && player.position.x + player_size >= i.position.x + i.size.x / 2.0
+                && player.position.x + player_size >= i.position.x - i.size.x / 2.0
                 && player.position.y - player_size <= i.position.y + i.size.y / 2.0
-                && player.position.y + player_size >= i.position.y + i.size.y / 2.0
+                && player.position.y + player_size >= i.position.y - i.size.y / 2.0
             {
                 // if player.velocity.x < 0.0 {
                 //     player.position.x = i.position.x + i.size.x / 2.0 + player_size;
@@ -781,9 +781,9 @@
 
         for i in &self.world_colliders {
             if player.position.x - player_size <= i.position.x + i.size.x / 2.0
-                && player.position.x + player_size >= i.position.x + i.size.x / 2.0
-                && player.position.y - player_size <= i.position.y + i.size.y / 2.0
-                && player.position.y + player_size >= i.position.y + i.size.y / 2.0
+            && player.position.x + player_size >= i.position.x - i.size.x / 2.0
+            && player.position.y - player_size <= i.position.y + i.size.y / 2.0
+            && player.position.y + player_size >= i.position.y - i.size.y / 2.0
             {
                 // if player.velocity.y < 0.0 {
                 //     player.position.y = i.position.y + i.size.y / 2.0 + player_size;