Skip to content

Commit

Permalink
Add bevy reflect
Browse files Browse the repository at this point in the history
  • Loading branch information
killercup committed May 22, 2023
1 parent 29a96c5 commit 50b874f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ algorithms = []
packed = []
# serde compatibility
ser_de = ["serde", "glam/serde"]
# bevy_reflect
bevy_010_reflect = ["bevy_reflect"]

[dependencies]
glam = "0.23"
Expand All @@ -28,6 +30,11 @@ default-features = false
features = ["derive"]
optional = true

[dependencies.bevy_reflect]
version = "0.10.1"
default-features = false
optional = true

# For lib.rs doctests and examples
[dev-dependencies.bevy]
version = "0.10"
Expand Down
1 change: 1 addition & 0 deletions src/hex/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ use std::cmp::{max, min};
#[cfg_attr(not(target_arch = "spirv"), derive(Debug, Hash))]
#[cfg_attr(feature = "ser_de", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "packed", repr(C))]
#[cfg_attr(feature = "bevy_010_reflect", derive(bevy_reflect::Reflect, bevy_reflect::FromReflect))]
pub struct Hex {
/// `x` axial coordinate (sometimes called `q` or `i`)
pub x: i32,
Expand Down

0 comments on commit 50b874f

Please sign in to comment.