mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
Derive Debug for State and NextState (#7651)
# Objective - Derive Debug for State and NextState
This commit is contained in:
parent
5a71831b31
commit
14a7689e1a
1 changed files with 2 additions and 2 deletions
|
@ -68,7 +68,7 @@ pub struct OnUpdate<S: States>(pub S);
|
|||
/// [`apply_state_transition::<S>`] system.
|
||||
///
|
||||
/// The starting state is defined via the [`Default`] implementation for `S`.
|
||||
#[derive(Resource, Default)]
|
||||
#[derive(Resource, Default, Debug)]
|
||||
pub struct State<S: States>(pub S);
|
||||
|
||||
/// The next state of [`State<S>`].
|
||||
|
@ -76,7 +76,7 @@ pub struct State<S: States>(pub S);
|
|||
/// To queue a transition, just set the contained value to `Some(next_state)`.
|
||||
/// Note that these transitions can be overriden by other systems:
|
||||
/// only the actual value of this resource at the time of [`apply_state_transition`] matters.
|
||||
#[derive(Resource, Default)]
|
||||
#[derive(Resource, Default, Debug)]
|
||||
pub struct NextState<S: States>(pub Option<S>);
|
||||
|
||||
impl<S: States> NextState<S> {
|
||||
|
|
Loading…
Reference in a new issue