Skip to content

Commit

Permalink
More doc linkage
Browse files Browse the repository at this point in the history
  • Loading branch information
Alice Cecile committed Jan 24, 2024
1 parent 68b6873 commit 40b6e29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ use bevy::ui::UiSystem;
/// - [`tick_action_state`](crate::systems::tick_action_state), which resets the `pressed` and `just_pressed` fields of the [`ActionState`] each frame
/// - [`update_action_state`](crate::systems::update_action_state), which collects [`Input`](bevy::input::Input) resources to update the [`ActionState`]
/// - [`update_action_state_from_interaction`](crate::systems::update_action_state_from_interaction), for triggering actions from buttons
/// - powers the [`ActionStateDriver`](crate::action_state::ActionStateDriver) component based on an [`Interaction`](bevy::ui::Interaction) component
/// - powers the [`ActionStateDriver`](crate::action_driver::ActionStateDriver) component based on an [`Interaction`](bevy::ui::Interaction) component
/// - [`release_on_disable`](crate::systems::release_on_disable), which resets action states when [`ToggleActions`] is flipped, to avoid persistent presses.
pub struct InputManagerPlugin<A: Actionlike> {
_phantom: PhantomData<A>,
Expand All @@ -72,7 +72,7 @@ impl<A: Actionlike> InputManagerPlugin<A> {
///
/// Inputs will not be processed; instead, [`ActionState`]
/// should be copied directly from the state provided by the client,
/// or constructed from [`ActionDiff`](crate::action_state::ActionDiff) event streams.
/// or constructed from [`ActionDiff`](crate::action_diff::ActionDiff) event streams.
#[must_use]
pub fn server() -> Self {
Self {
Expand Down
6 changes: 2 additions & 4 deletions src/timing.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Information about when an action was pressed or released.
#[allow(unused_imports)] // For the documentation
use crate::action_state::ActionState;
use bevy::{
reflect::Reflect,
utils::{Duration, Instant},
Expand All @@ -10,8 +8,8 @@ use serde::{Deserialize, Serialize};

/// Stores information about when an action was pressed or released
///
/// This struct is principally used as a field on [`ActionData`],
/// which itself lives inside an [`ActionState`].
/// This struct is principally used as a field on [`ActionData`](crate::action_state::ActionData),
/// which itself lives inside an [`ActionState`](crate::action_state::ActionState).
#[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize, Reflect)]
pub struct Timing {
/// The [`Instant`] at which the button was pressed or released
Expand Down

0 comments on commit 40b6e29

Please sign in to comment.