mirror of
https://git.kittycat.homes/zoe/codename-routes.git
synced 2024-08-15 03:18:26 +00:00
ive decided its fine if the state server is public
This commit is contained in:
parent
74e9d94977
commit
5b58f246a0
7 changed files with 35 additions and 29 deletions
|
@ -39,6 +39,11 @@ impl StateServer {
|
|||
_owner.emit_signal("changed_tiletypes", &[Variant::new(&w)]);
|
||||
}
|
||||
|
||||
#[export]
|
||||
fn get_world_size(&self, _ownser: &Node) -> Vector3 {
|
||||
Vector3::new(self.world.xsize as f32, self.world.ysize as f32, self.world.zsize as f32)
|
||||
}
|
||||
|
||||
#[export]
|
||||
fn get_tile_at(&self, _owner: &Node, x: usize, y: usize, z: usize) -> u16 {
|
||||
self.world.get_tile_at(x, y, z)
|
||||
|
|
|
@ -3,9 +3,9 @@ use gdnative::prelude::*;
|
|||
mod tiles;
|
||||
|
||||
pub struct World {
|
||||
xsize: usize,
|
||||
ysize: usize,
|
||||
zsize: usize,
|
||||
pub xsize: usize,
|
||||
pub ysize: usize,
|
||||
pub zsize: usize,
|
||||
tiles: Vec<Vec<Vec<tiles::Tiletypes>>>,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue