Skip to main content

subtr_actor/stats/analysis_graph/nodes/
flick.rs

1use super::*;
2use crate::stats::calculators::*;
3use crate::*;
4
5/// Detects flicks from ball/player state and touches during live play.
6pub struct FlickNode {
7    calculator: FlickCalculator,
8}
9
10impl FlickNode {
11    pub fn new() -> Self {
12        Self {
13            calculator: FlickCalculator::new(),
14        }
15    }
16}
17
18impl_analysis_node! {
19    node = FlickNode,
20    state = FlickCalculator,
21    name = "flick",
22    emitted_events = crate::stats::calculators::FLICK_EMITTED_EVENTS,
23    dependencies = [
24        frame_info_dependency() => FrameInfo,
25        ball_frame_state_dependency() => BallFrameState,
26        player_frame_state_dependency() => PlayerFrameState,
27        touch_state_dependency() => TouchState,
28        touch_dependency() => TouchCalculator,
29        live_play_dependency() => LivePlayState,
30    ],
31    call = calculator.update,
32}