mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 12:25:02 +01:00
Make collision work horizontally
This commit is contained in:
parent
f07bd9c713
commit
413875909e
2 changed files with 26 additions and 2 deletions
|
|
@ -8,6 +8,7 @@ use crate::{
|
|||
pub struct Player {
|
||||
pub col_en: MobileEntity,
|
||||
pub vspeed: f32,
|
||||
pub hspeed: f32,
|
||||
}
|
||||
|
||||
impl Player {
|
||||
|
|
@ -15,6 +16,7 @@ impl Player {
|
|||
Self {
|
||||
col_en: MobileEntity::from_pos_and_bb(vec2(pos.x as i32, pos.y as i32), vec2(15, 24)),
|
||||
vspeed: 0.0,
|
||||
hspeed: 0.0,
|
||||
}
|
||||
}
|
||||
pub fn center_tp(&self) -> TilePos {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue