Skip to content

Commit

Permalink
Fix some typos (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
striezel authored Aug 29, 2023
1 parent bf06951 commit 7ef3837
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/charges.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{Abilitylike, CannotUseAbility};

/// A component / resource that stores the [`Charges`] for each [`Abilitylike`] action of type `A`.
///
/// If [`Charges`] is set for an actions, it is only [`Abilitylike::ready`] when at least one charge is availabe.
/// If [`Charges`] is set for an actions, it is only [`Abilitylike::ready`] when at least one charge is available.
///
/// ```rust
/// use bevy::reflect::Reflect;
Expand Down Expand Up @@ -42,7 +42,7 @@ use crate::{Abilitylike, CannotUseAbility};
/// }
///
/// fn cooldowns() -> CooldownState<Action> {
/// // Ommitted cooldowns and charges will cause the action to be treated as if it always had available cooldowns / charges to use
/// // Omitted cooldowns and charges will cause the action to be treated as if it always had available cooldowns / charges to use.
/// CooldownState::new([
/// (Action::Dash, Cooldown::from_secs(2.)),
/// (Action::Spell, Cooldown::from_secs(4.5)),
Expand All @@ -57,22 +57,22 @@ use crate::{Abilitylike, CannotUseAbility};
/// }
/// }
///
/// // In a real game you'd spawn a bundle with the appropriate components
/// // In a real game you'd spawn a bundle with the appropriate components.
/// let mut abilities_bundle = AbilitiesBundle {
/// cooldowns: Action::cooldowns(),
/// charges: Action::charges(),
/// ..Default::default()
/// };
///
/// // You can also define resource pools using a seperate bundle
/// // Typically, you'll want to nest both of these bundles under a custom Bundle type for your characters
/// // You can also define resource pools using a separate bundle.
/// // Typically, you'll want to nest both of these bundles under a custom Bundle type for your characters.
/// let mut mana_bundle = PoolBundle {
/// // Max mana of 1000., regen rate of 10.
/// pool: ManaPool::new_full(Mana(100.0), Mana(1.0)),
/// ability_costs: Action::mana_costs(),
/// };
///
/// // Then, you can check if an action is ready to be used
/// // Then, you can check if an action is ready to be used.
/// // Consider using the `AbilityState` `WorldQuery` type instead for convenience!
/// if Action::Spell.ready(&abilities_bundle.charges, &abilities_bundle.cooldowns, Some(&mana_bundle.pool), Some(&mana_bundle.ability_costs)).is_ok() {
/// // When you use an action, remember to trigger it!
Expand Down
4 changes: 2 additions & 2 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use leafwing_input_manager::plugin::{InputManagerSystem, ToggleActions};
/// Each variant represents a "virtual button" whose state is stored in an [`ActionState`](crate::action_state::ActionState) struct.
///
/// Each [`InputManagerBundle`](crate::InputManagerBundle) contains:
/// - an [`InputMap`](crate::input_map::InputMap) component, which stores an entity-specific mapping between the assorted input streams and an internal repesentation of "actions"
/// - an [`InputMap`](crate::input_map::InputMap) component, which stores an entity-specific mapping between the assorted input streams and an internal representation of "actions"
/// - an [`ActionState`](crate::action_state::ActionState) component, which stores the current input state for that entity in an source-agnostic fashion
///
/// If you have more than one distinct type of action (e.g. menu actions, camera actions and player actions), consider creating multiple `Actionlike` enums
Expand All @@ -24,7 +24,7 @@ use leafwing_input_manager::plugin::{InputManagerSystem, ToggleActions};
/// All systems added by this plugin can be dynamically enabled and disabled by setting the value of the [`ToggleActions<A>`] resource is set.
/// This can be useful when working with states to pause the game, navigate menus or so on.
///
/// **WARNING:** Theses systems run during [`CoreStage::PreUpdate`].
/// **WARNING:** These systems run during [`CoreStage::PreUpdate`].
/// If you have systems that care about inputs and actions that also run during this stage,
/// you must define an ordering between your systems or behavior will be very erratic.
/// The stable labels for these systems are available under [`InputManagerSystem`] enum.
Expand Down

0 comments on commit 7ef3837

Please sign in to comment.