Start integrating asset loading and animations

This commit is contained in:
2026-08-26 16:33:00 +02:00
parent 73855ea354
commit 4ff388f9c0
23 changed files with 724 additions and 301 deletions
+5 -2
View File
@@ -11,6 +11,7 @@ pub struct FighterAttributes {
pub stick_walk_accel: FGi32,
pub max_walk_vel: FGi32,
pub dash_acceleration_duration: u32,
pub dash_duration: u32,
pub dash_initial_velocity: FGi32,
pub base_dash_accel: FGi32,
@@ -26,11 +27,13 @@ pub struct FighterAttributes {
}
impl FighterAttributes {
pub fn get_accel_and_target_dashrun(&self, input: &FighterInputFrame) -> (FGi32, FGi32) {
pub fn get_accel_and_target_dashrun(&self, input: &FighterInputFrame, direction: FGi32) -> (FGi32, FGi32) {
let accel = input.movement.x * self.stick_dash_accel;
let accel = accel + input.movement.x.signum() * self.base_dash_accel;
let accel = accel + direction * self.base_dash_accel;
let target_vel = input.movement.x * self.max_dash_vel;
info!("ACCEL {}", accel);
(accel, target_vel)
}