Derive Debug for State and NextState (#7651)

# Objective

- Derive Debug for State and NextState
This commit is contained in:
张林伟 2023-02-13 18:20:31 +00:00
parent 5a71831b31
commit 14a7689e1a

View file

@ -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> {