Skip to content

Commit

Permalink
Document TnuaBuiltinKnockbackState's variants
Browse files Browse the repository at this point in the history
  • Loading branch information
idanarye committed Oct 8, 2024
1 parent c4799db commit 3a60ace
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/builtins/knockback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl TnuaAction for TnuaBuiltinKnockback {
motor: &mut TnuaMotor,
) -> TnuaActionLifecycleDirective {
match state {
TnuaBuiltinKnockbackState::Boost => {
TnuaBuiltinKnockbackState::Shove => {
let Some(boundary) = VelocityBoundary::new(
ctx.tracker.velocity,
ctx.tracker.velocity + self.shove,
Expand Down Expand Up @@ -184,11 +184,13 @@ impl TnuaAction for TnuaBuiltinKnockback {

#[derive(Default)]
pub enum TnuaBuiltinKnockbackState {
/// Applying the [`shove`](TnuaBuiltinKnockback::shove) impulse to the character.
#[default]
Boost,
Pushback {
boundary: VelocityBoundary,
},
Shove,
/// Hindering the character's ability to overcome the
/// [`Shove`](TnuaBuiltinKnockbackState::Shove) while waiting for it to overcome it despite the
/// hindrance.
Pushback { boundary: VelocityBoundary },
}

/// An indication that a character was knocked back and "struggles" to get back to its original
Expand Down

0 comments on commit 3a60ace

Please sign in to comment.