mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 20:35:02 +01:00
Add basic player physics
This commit is contained in:
parent
5a6fe33e1e
commit
beabf269e5
3 changed files with 37 additions and 13 deletions
|
|
@ -7,12 +7,14 @@ use crate::{
|
|||
|
||||
pub struct Player {
|
||||
pub col_en: MobileEntity,
|
||||
pub vspeed: f32,
|
||||
}
|
||||
|
||||
impl Player {
|
||||
pub fn new_at(pos: WorldPos) -> Self {
|
||||
Self {
|
||||
col_en: MobileEntity::from_pos_and_bb(vec2(pos.x as i32, pos.y as i32), vec2(15, 24)),
|
||||
vspeed: 0.0,
|
||||
}
|
||||
}
|
||||
pub fn center_tp(&self) -> TilePos {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue