Implement hitstun and knockback.
This commit is contained in:
+15
-4
@@ -8,7 +8,9 @@ use bevy_ggrs::prelude::Session;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
AppState, args::Args, fighter::{
|
||||
AppState,
|
||||
args::Args,
|
||||
fighter::{
|
||||
FighterId, FighterRoster,
|
||||
animation::AnimKind,
|
||||
attack::{AttackKind, FighterAttackScriptAssets},
|
||||
@@ -16,7 +18,12 @@ use crate::{
|
||||
manifest::{FighterManifest, FighterManifestRegistry},
|
||||
spawn_fighter,
|
||||
visual::FighterAnimations,
|
||||
}, input::{LocalInputAssignments, LocalInputSource}, math::{int::FGi32, vec::FGVec2}, netcode::{GGRSCfg, session::create_session}, scripting::FighterAttackScript, stage::{
|
||||
},
|
||||
input::{LocalInputAssignments, LocalInputSource},
|
||||
math::{int::FGi32, vec::FGVec2},
|
||||
netcode::{GGRSCfg, session::create_session},
|
||||
scripting::FighterAttackScript,
|
||||
stage::{
|
||||
self,
|
||||
manifest::{StageId, StageManifest, StageManifestRegistry},
|
||||
},
|
||||
@@ -145,6 +152,10 @@ pub fn initiate_default_match(
|
||||
mut next_state: ResMut<NextState<AppState>>,
|
||||
completed: Option<Res<crate::replay::ReplayComplete>>,
|
||||
) {
|
||||
if !args.debug_match {
|
||||
next_state.set(AppState::MainMenu);
|
||||
return;
|
||||
}
|
||||
if completed.is_some() {
|
||||
return;
|
||||
}
|
||||
@@ -174,8 +185,8 @@ pub fn initiate_default_match(
|
||||
|
||||
assigments.push((0, LocalInputSource::Keyboard));
|
||||
|
||||
for (idx, entity) in gamepads.iter().take(args.players-1).enumerate() {
|
||||
assigments.push((idx+1, LocalInputSource::Gamepad(entity)));
|
||||
for (idx, entity) in gamepads.iter().take(args.players - 1).enumerate() {
|
||||
assigments.push((idx + 1, LocalInputSource::Gamepad(entity)));
|
||||
}
|
||||
|
||||
initiate_match(
|
||||
|
||||
Reference in New Issue
Block a user