Spawn Building

This commit is contained in:
2024-08-03 12:40:45 -04:00
parent 29f480b8a7
commit f337b78bee
6 changed files with 62 additions and 8 deletions

View File

@@ -1,3 +1,5 @@
use std::fmt::Display;
use crate::prelude::Chunk;
use bevy::prelude::*;
use serde::{Deserialize, Serialize};
@@ -62,6 +64,12 @@ pub struct HexCoord {
pub hex: IVec3,
}
impl Display for HexCoord {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_fmt(format_args!("HexCoord{}", self.hex))
}
}
impl HexCoord {
pub const DIRECTIONS: [IVec3; 6] = [
IVec3::new(0, 1, -1),