From c2a7b2f5d1d4aa9e09449323eec988b73312a7e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80lex=20Rom=C3=A0n?= Date: Mon, 31 Aug 2026 19:57:56 +0200 Subject: [PATCH] Add missed visual.rs --- src/fighter/visual.rs | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/fighter/visual.rs b/src/fighter/visual.rs index 64380be..244b08e 100644 --- a/src/fighter/visual.rs +++ b/src/fighter/visual.rs @@ -1,7 +1,7 @@ use bevy::prelude::*; use std::collections::HashMap; -use crate::fighter::animation::{AnimKind, FighterAnimationFrame}; +use crate::fighter::animation::AnimKind; use crate::fighter::baked_animation::BakedFighterAnimations; #[derive(Component, Clone)] @@ -11,24 +11,3 @@ pub struct FighterAnimations { /// Gameplay samples this fixed-point asset; the graph remains visual-only. pub baked: Handle, } - -impl FighterAnimations { - pub fn sample_bone( - &self, - baked_assets: &Assets, - frame: &FighterAnimationFrame, - bone: &str, - ) -> Option { - let baked = baked_assets.get(&self.baked)?; - let frame_count = baked.frame_count(frame.kind)?; - if frame_count == 0 { - return None; - } - let frame_index = if frame.repeat { - frame.frame % frame_count - } else { - frame.frame - }; - baked.sample(frame.kind, frame_index, bone) - } -}