mirror of
https://github.com/bevyengine/bevy
synced 2024-11-26 14:40:19 +00:00
Add Hash for Tick (#13525)
# Objective - There are some situations (networking) where storing `Tick` as a key in a hashmap is useful
This commit is contained in:
parent
d26900a9ea
commit
223a54629c
1 changed files with 6 additions and 2 deletions
|
@ -906,8 +906,12 @@ impl<'w> ComponentInitializer<'w> {
|
||||||
/// This is used to power change detection.
|
/// This is used to power change detection.
|
||||||
///
|
///
|
||||||
/// *Note* that a system that hasn't been run yet has a `Tick` of 0.
|
/// *Note* that a system that hasn't been run yet has a `Tick` of 0.
|
||||||
#[derive(Copy, Clone, Default, Debug, Eq, PartialEq)]
|
#[derive(Copy, Clone, Default, Debug, Eq, Hash, PartialEq)]
|
||||||
#[cfg_attr(feature = "bevy_reflect", derive(Reflect), reflect(Debug, PartialEq))]
|
#[cfg_attr(
|
||||||
|
feature = "bevy_reflect",
|
||||||
|
derive(Reflect),
|
||||||
|
reflect(Debug, Hash, PartialEq)
|
||||||
|
)]
|
||||||
pub struct Tick {
|
pub struct Tick {
|
||||||
tick: u32,
|
tick: u32,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue