mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 20:35:02 +01:00
Add tile placement
This commit is contained in:
parent
be1bc9ca9e
commit
20409e3ee2
3 changed files with 13 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ use crate::{
|
|||
graphics::{ScreenPos, ScreenPosScalar, NATIVE_RESOLUTION},
|
||||
math::{wp_to_tp, WorldPos},
|
||||
res::Res,
|
||||
world::{Tile, TilePos, World},
|
||||
world::{Tile, TileId, TilePos, World},
|
||||
};
|
||||
|
||||
use self::player::Player;
|
||||
|
|
@ -16,6 +16,7 @@ pub struct GameState {
|
|||
pub world: World,
|
||||
pub player: Player,
|
||||
pub gravity: f32,
|
||||
pub tile_to_place: TileId,
|
||||
}
|
||||
impl GameState {
|
||||
pub(crate) fn draw_world(&mut self, rw: &mut RenderWindow, res: &Res) {
|
||||
|
|
@ -75,6 +76,7 @@ impl Default for GameState {
|
|||
world: Default::default(),
|
||||
player: Player::new_at(spawn_point),
|
||||
gravity: 0.7,
|
||||
tile_to_place: 1,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue