Struct client::WorldManager
[−]
[src]
pub struct WorldManager { // some fields omitted }
Methods
impl WorldManager
[src]
fn new(provider: Box<ChunkProvider>, game_context: Rc<GameContext>) -> Self
fn get_world(&self) -> Ref<World>
Returns an immutable reference to the world.
Note: since the world manager uses a RefCell
to save the world, a
Ref
is returned. But thanks to deref coercions you can use it like a
standard reference.
fn mut_world(&self) -> RefMut<World>
fn get_view(&self) -> Ref<WorldView>
Returns an immutable reference to the world view.
fn get_mut_view(&self) -> RefMut<WorldView>
Returns an mutable reference to the world view.
fn get_context(&self) -> &Rc<GameContext>
fn update_world(&self, player_pos: Point3f)
Applies all queued updated to the actual world. Notably, all generated chunks are added.
fn recalculate_chunk(&mut self, pos: AxialPoint)
Trait Implementations
impl Clone for WorldManager
[src]
fn clone(&self) -> WorldManager
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more