Compare commits
2
Commits
d1782afe51
...
c0c88d5dbd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0c88d5dbd | ||
|
|
a83caf9153 |
@@ -168,6 +168,8 @@ mod tests {
|
|||||||
air_dodge_duration: 0,
|
air_dodge_duration: 0,
|
||||||
air_dodge_velocity: FGi32::ZERO,
|
air_dodge_velocity: FGi32::ZERO,
|
||||||
air_dodge_decay: FGi32::ZERO,
|
air_dodge_decay: FGi32::ZERO,
|
||||||
|
air_dodge_intangible_duration: 29,
|
||||||
|
air_dodge_intangible_start: 4,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ impl FighterStateImpl for AirDodgeState {
|
|||||||
let airdodge_intangible_end = state_context.fighter_attributes.air_dodge_intangible_start + state_context.fighter_attributes.air_dodge_intangible_duration;
|
let airdodge_intangible_end = state_context.fighter_attributes.air_dodge_intangible_start + state_context.fighter_attributes.air_dodge_intangible_duration;
|
||||||
if state_context.animation_frame == state_context.fighter_attributes.air_dodge_intangible_start {
|
if state_context.animation_frame == state_context.fighter_attributes.air_dodge_intangible_start {
|
||||||
*state_context.vulnerability = FighterInvulnerabilityState::Intangible;
|
*state_context.vulnerability = FighterInvulnerabilityState::Intangible;
|
||||||
} else if state_context.animation_frame > airdodge_intangible_end {
|
} else if state_context.animation_frame >= airdodge_intangible_end {
|
||||||
*state_context.vulnerability = FighterInvulnerabilityState::Vulnerable;
|
*state_context.vulnerability = FighterInvulnerabilityState::Vulnerable;
|
||||||
}
|
}
|
||||||
state_context.velocity.0 *= state_context.fighter_attributes.air_dodge_decay;
|
state_context.velocity.0 *= state_context.fighter_attributes.air_dodge_decay;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ use crate::{
|
|||||||
manifest::{FighterManifest, FighterManifestRegistry},
|
manifest::{FighterManifest, FighterManifestRegistry},
|
||||||
spawn_fighter,
|
spawn_fighter,
|
||||||
visual::FighterAnimations,
|
visual::FighterAnimations,
|
||||||
}, input::{LocalInputAssignments, LocalInputSource, MatchInputAssignments}, match_runtime::MatchState, materials::fighter_material::FighterMaterial, netcode::{
|
}, input::{LocalInputAssignments, LocalInputSource, MatchInputAssignments}, match_runtime::MatchState, netcode::{
|
||||||
GGRSCfg,
|
GGRSCfg,
|
||||||
session::{ConnectionStatus, SessionConfig, create_session},
|
session::{ConnectionStatus, SessionConfig, create_session},
|
||||||
}, scripting::FighterAttackScript, stage::{
|
}, scripting::FighterAttackScript, stage::{
|
||||||
|
|||||||
@@ -13,17 +13,6 @@ pub struct FighterMaterialExtension {
|
|||||||
status_color: LinearRgba,
|
status_color: LinearRgba,
|
||||||
#[uniform(100)]
|
#[uniform(100)]
|
||||||
status_color_intensity: f32,
|
status_color_intensity: f32,
|
||||||
|
|
||||||
// Web examples WebGL2 support: structs must be 16 byte aligned.
|
|
||||||
#[cfg(feature = "webgl2")]
|
|
||||||
#[uniform(100)]
|
|
||||||
_webgl2_padding_8b: u32,
|
|
||||||
#[cfg(feature = "webgl2")]
|
|
||||||
#[uniform(100)]
|
|
||||||
_webgl2_padding_12b: u32,
|
|
||||||
#[cfg(feature = "webgl2")]
|
|
||||||
#[uniform(100)]
|
|
||||||
_webgl2_padding_16b: u32,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const SHADER_ASSET_PATH: &str = "embedded://shinespark/shaders/fighter.wgsl";
|
const SHADER_ASSET_PATH: &str = "embedded://shinespark/shaders/fighter.wgsl";
|
||||||
|
|||||||
@@ -1,16 +1,8 @@
|
|||||||
use bevy::{
|
use bevy::{
|
||||||
asset::embedded_asset, gltf::GltfMaterialName, material::OpaqueRendererMethod, pbr::ExtendedMaterial, prelude::*, world_serialization::WorldInstanceReady,
|
asset::embedded_asset, prelude::*,
|
||||||
};
|
};
|
||||||
|
|
||||||
use bevy::{
|
|
||||||
color::palettes::basic::RED,
|
|
||||||
pbr::{MaterialExtension},
|
|
||||||
prelude::*,
|
|
||||||
render::render_resource::*,
|
|
||||||
shader::ShaderRef,
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::materials::fighter_material::{FighterMaterial, FighterMaterialExtension};
|
|
||||||
|
|
||||||
pub mod fighter_material;
|
pub mod fighter_material;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user