Derive Debug for State and NextState (#7651)
# Objective - Derive Debug for State and NextState
This commit is contained in:
parent
5a71831b31
commit
14a7689e1a
@ -68,7 +68,7 @@ pub struct OnUpdate<S: States>(pub S);
|
|||||||
/// [`apply_state_transition::<S>`] system.
|
/// [`apply_state_transition::<S>`] system.
|
||||||
///
|
///
|
||||||
/// The starting state is defined via the [`Default`] implementation for `S`.
|
/// 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);
|
pub struct State<S: States>(pub S);
|
||||||
|
|
||||||
/// The next state of [`State<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)`.
|
/// To queue a transition, just set the contained value to `Some(next_state)`.
|
||||||
/// Note that these transitions can be overriden by other systems:
|
/// 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.
|
/// 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>);
|
pub struct NextState<S: States>(pub Option<S>);
|
||||||
|
|
||||||
impl<S: States> NextState<S> {
|
impl<S: States> NextState<S> {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user