Skip to content

Commit

Permalink
Improve documenting comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaop committed Aug 19, 2024
1 parent a513c44 commit 2d4bb6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/action_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,16 @@ impl<A: Actionlike> SummarizedActionState<A> {
entities
}

/// Captures the raw values for each action in the current frame
/// Captures the raw values for each action in the current frame, for all entities with `ActionState<A>`.
pub fn summarize(
global_action_state: Option<Res<ActionState<A>>>,
action_state_query: Query<(Entity, &ActionState<A>)>,
) -> Self {
Self::summarize_filtered(global_action_state, action_state_query)
}

/// Captures the raw values for each action in the current frame, for entities that match the query filter.
/// Captures the raw values for each action in the current frame, for entities with `ActionState<A>`
/// matching the query filter.
pub fn summarize_filtered<F: QueryFilter>(
global_action_state: Option<Res<ActionState<A>>>,
action_state_query: Query<(Entity, &ActionState<A>), F>,
Expand Down
3 changes: 1 addition & 2 deletions src/systems.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ pub fn generate_action_diffs<A: Actionlike>(
/// Generally speaking, this should be added as part of [`PostUpdate`](bevy::prelude::PostUpdate),
/// to ensure that all inputs have been processed and any manual actions have been sent.
///
/// This system allows for more fine-grained control over which entities' action states are considered
/// when generating action diffs.
/// This system accepts a filter to limit which entities should have action diffs generated.
pub fn generate_action_diffs_filtered<A: Actionlike, F: QueryFilter>(
global_action_state: Option<Res<ActionState<A>>>,
action_state_query: Query<(Entity, &ActionState<A>), F>,
Expand Down

0 comments on commit 2d4bb6e

Please sign in to comment.