Struct game_logic::model::world_object::ObjectCollider [−][src]
pub struct ObjectCollider {
pub position: Vector2<f32>,
- pub size: Option<Vector2<f32>>,
+ pub size: Vector2<f32>,
}
Expand description
Defines a collider in object space.
Fields
position: Vector2<f32>
Position, relative to the object’s center (north east is 1,1 south west is -1,-1)
-size: Option<Vector2<f32>>
Possible sizing
+size: Vector2<f32>
Possible sizing
Trait Implementations
Formats the value using the given formatter. Read more
diff --git a/rustdoc/game_logic/scenes/player_interaction/index.html b/rustdoc/game_logic/scenes/player_interaction/index.html index 79671d60..89758f3b 100644 --- a/rustdoc/game_logic/scenes/player_interaction/index.html +++ b/rustdoc/game_logic/scenes/player_interaction/index.html @@ -1,6 +1,6 @@Module game_logic::scenes::player_interaction [−][src]
Expand description
This scene encompasses all of the game where the player can walk around.
+Module player_interaction
Module game_logic::scenes::player_interaction [−][src]
Expand description
This scene encompasses all of the game where the player can walk around.
Structs
Fields
has_updated_discord_rpc: bool
player: Player
world_map: MapRenderer
camera: Camera2D
last_update: SystemTime
game_soundtrack: Music
world_colliders: Vec<ObjectCollider>
Implementations
pub fn new(
raylib_handle: &mut RaylibHandle,
thread: &RaylibThread,
constants: &ProjectConstants
) -> Self
pub fn new(
raylib_handle: &mut RaylibHandle,
thread: &RaylibThread,
constants: &ProjectConstants
) -> Self
Construct a new PlayableScene
Fields
has_updated_discord_rpc: bool
player: Player
world_map: MapRenderer
camera: Camera2D
last_update: SystemTime
game_soundtrack: Music
world_colliders: Vec<ObjectCollider>
Implementations
pub fn new(
raylib_handle: &mut RaylibHandle,
thread: &RaylibThread,
constants: &ProjectConstants
) -> Self
pub fn new(
raylib_handle: &mut RaylibHandle,
thread: &RaylibThread,
constants: &ProjectConstants
) -> Self
Construct a new PlayableScene
pub async fn render_frame(
&mut self,
raylib: &mut RaylibHandle,
rl_thread: &RaylibThread,
discord: &Sender<DiscordRpcSignal>,
global_resources: &GlobalResources,
constants: &ProjectConstants,
audio_subsystem: &mut RaylibAudio
)
pub async fn render_frame(
&mut self,
raylib: &mut RaylibHandle,
rl_thread: &RaylibThread,
discord: &Sender<DiscordRpcSignal>,
global_resources: &GlobalResources,
constants: &ProjectConstants,
audio_subsystem: &mut RaylibAudio
)
Handler for each frame
-Trait Implementations
Formats the value using the given formatter. Read more
+Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PlayableScene
impl !Send for PlayableScene
impl !Sync for PlayableScene
impl Unpin for PlayableScene
impl UnwindSafe for PlayableScene
Blanket Implementations
Mutably borrows from an owned value. Read more
diff --git a/rustdoc/src/game_logic/model/world_object.rs.html b/rustdoc/src/game_logic/model/world_object.rs.html index 507866b9..8046c825 100644 --- a/rustdoc/src/game_logic/model/world_object.rs.html +++ b/rustdoc/src/game_logic/model/world_object.rs.html @@ -108,7 +108,7 @@ /// Position, relative to the object's center (north east is 1,1 south west is -1,-1) pub position: na::Vector2<f32>, /// Possible sizing - pub size: Option<na::Vector2<f32>>, + pub size: na::Vector2<f32>, } // Handy aliases diff --git a/rustdoc/src/game_logic/scenes/player_interaction.rs.html b/rustdoc/src/game_logic/scenes/player_interaction.rs.html index 75711024..742b567a 100644 --- a/rustdoc/src/game_logic/scenes/player_interaction.rs.html +++ b/rustdoc/src/game_logic/scenes/player_interaction.rs.html @@ -248,6 +248,7 @@ 246 247 248 +249//! This scene encompasses all of the game where the player can walk around.
use nalgebra as na;
@@ -410,6 +411,7 @@
let current_temperature = self.world_map.sample_temperature_at(player.position);
let map_size = self.world_map.get_map_size();
// TODO: You can access the colission list with: self.world_colliders
+ // like this: self.world_colliders[0].size.x;
// Get input direction components
let h_axis = raylib.is_key_down(KeyboardKey::KEY_D) as i8