refactoring hex coords

This commit is contained in:
2026-03-14 19:55:53 -04:00
parent c5da119109
commit 912ee376c6
36 changed files with 595 additions and 698 deletions

View File

@@ -1,18 +1,21 @@
use bevy::prelude::*;
use world_generation::hex_utils::HexCoord;
use hex::prelude::*;
#[derive(Resource, Default)]
pub struct TileUnderCursor(pub Option<TileContact>);
#[derive(Clone, Copy)]
pub struct TileContact {
pub struct TileContact
{
pub tile: HexCoord,
pub point: Vec3,
pub surface: Vec3,
}
impl TileContact {
pub fn new(tile: HexCoord, contact: Vec3, surface: Vec3) -> Self {
impl TileContact
{
pub fn new(tile: HexCoord, contact: Vec3, surface: Vec3) -> Self
{
return Self {
tile,
point: contact,