[][src]Struct brawllib_rs::script_runner::ScriptRunner

pub struct ScriptRunner<'a> {
    pub call_stacks: Vec<CallStack<'a>>,
    pub fighter_scripts: &'a [&'a ScriptAst],
    pub common_scripts: &'a [&'a ScriptAst],
    pub section_scripts: &'a [SectionScriptAst],
    pub call_every_frame: HashMap<i32, CallEveryFrame<'a>>,
    pub visited_gotos: Vec<i32>,
    pub frame_index: f32,
    pub interruptible: bool,
    pub hitboxes: [Option<ScriptCollisionBox>; 7],
    pub hurtbox_state_all: HurtBoxState,
    pub hurtbox_states: HashMap<i32, HurtBoxState>,
    pub ledge_grab_enable: LedgeGrabEnable,
    pub frame_speed_modifier: f32,
    pub tag_display: bool,
    pub x: f32,
    pub y: f32,
    pub x_vel: f32,
    pub y_vel: f32,
    pub x_vel_modify: VelModify,
    pub y_vel_modify: VelModify,
    pub disable_movement: DisableMovement,
    pub armor_type: ArmorType,
    pub armor_tolerance: f32,
    pub damage: f32,
    pub airbourne: bool,
    pub edge_slide: EdgeSlide,
    pub reverse_direction: bool,
    pub change_subaction: ChangeSubaction,
    pub invisible_bones: Vec<i32>,
    pub change_actions: Vec<ChangeAction>,
    pub hitbox_sets_rehit: [bool; 10],
    pub slope_contour_stand: Option<i32>,
    pub slope_contour_full: Option<(i32, i32)>,
    pub rumble: Option<(i32, i32)>,
    pub rumble_loop: Option<(i32, i32)>,
    pub grab_interrupt_damage: Option<i32>,
    pub throw: Option<SpecifyThrow>,
    pub throw_activate: bool,
    pub jumps_used: i32,
    pub wall_jump_count: i32,
    pub wall_jump_interval: i32,
    pub footstool_count: i32,
    pub fall_time: i32,
    pub swim_time: i32,
    pub lip_stick_refresh: i32,
    pub curry_remaining_time: i32,
    pub curry_angle2: i32,
    pub star_remaining_time: i32,
    pub mushroom_remaining_time: i32,
    pub lightning_remaining_time: i32,
    pub size_flag: i32,
    pub metal_block_remaining_time: i32,
    pub combo_count: i32,
    pub bubble_time: i32,
    pub attacks_performed: i32,
    pub costume_id: i32,
    pub hitstun_frames_remaining: i32,
    pub meteor_cancel_window: i32,
    pub missed_techs: i32,
    pub tether_count: i32,
    pub temp1: i32,
    pub temp2: i32,
    pub special_landing_lag: f32,
    pub special_fall_mobility_multiplier: f32,
    pub shield_charge: f32,
    pub curry_angle1: f32,
    pub curry_randomness: f32,
    pub is_dead: bool,
    pub cannot_die: bool,
    pub automatic_footstool: bool,
    pub has_final: bool,
    pub has_final_aura: bool,
    pub has_curry: bool,
    pub has_hammer: bool,
    pub hit_by_paralyze: bool,
    pub has_screw_attack: bool,
    pub stamina_dead: bool,
    pub has_tag: bool,
    pub can_not_ledge_grab: bool,
    pub can_not_teeter: bool,
    pub velocity_ignore_hitstun: bool,
    pub deflection: bool,
    pub throw_data_param1: i32,
    pub throw_data_param2: i32,
    pub throw_data_param3: i32,
    pub enable_turn_when_below_zero: f32,
    pub character_float: bool,
    pub enable_fast_fall: bool,
    pub shorthop: bool,
    pub enable_action_transition: bool,
    pub specials_movement: bool,
    pub enable_glide: bool,
    pub enable_jab_loop: bool,
    pub enable_auto_jab: bool,
    pub enable_jab_end: bool,
    pub landing_lag: bool,
}

Fields

call_stacks: Vec<CallStack<'a>>fighter_scripts: &'a [&'a ScriptAst]common_scripts: &'a [&'a ScriptAst]section_scripts: &'a [SectionScriptAst]call_every_frame: HashMap<i32, CallEveryFrame<'a>>visited_gotos: Vec<i32>frame_index: f32interruptible: boolhitboxes: [Option<ScriptCollisionBox>; 7]hurtbox_state_all: HurtBoxStatehurtbox_states: HashMap<i32, HurtBoxState>ledge_grab_enable: LedgeGrabEnableframe_speed_modifier: f32tag_display: boolx: f32

State is maintained across frames

y: f32

State is maintained across frames

x_vel: f32

State is maintained across frames

y_vel: f32

State is maintained across frames

x_vel_modify: VelModify

Reset to None before processing each frame

y_vel_modify: VelModify

Reset to None before processing each frame

disable_movement: DisableMovementarmor_type: ArmorTypearmor_tolerance: f32damage: f32airbourne: booledge_slide: EdgeSlidereverse_direction: boolchange_subaction: ChangeSubactioninvisible_bones: Vec<i32>

Children of these bones are also visible

change_actions: Vec<ChangeAction>

Each ChangeAction is rechecked every frame after being created

hitbox_sets_rehit: [bool; 10]slope_contour_stand: Option<i32>slope_contour_full: Option<(i32, i32)>rumble: Option<(i32, i32)>rumble_loop: Option<(i32, i32)>grab_interrupt_damage: Option<i32>throw: Option<SpecifyThrow>throw_activate: bool

Reset to false before processing each frame.

jumps_used: i32wall_jump_count: i32wall_jump_interval: i32footstool_count: i32fall_time: i32swim_time: i32lip_stick_refresh: i32curry_remaining_time: i32curry_angle2: i32star_remaining_time: i32mushroom_remaining_time: i32lightning_remaining_time: i32size_flag: i32metal_block_remaining_time: i32combo_count: i32bubble_time: i32attacks_performed: i32costume_id: i32hitstun_frames_remaining: i32meteor_cancel_window: i32missed_techs: i32tether_count: i32temp1: i32temp2: i32special_landing_lag: f32special_fall_mobility_multiplier: f32shield_charge: f32curry_angle1: f32curry_randomness: f32is_dead: boolcannot_die: boolautomatic_footstool: boolhas_final: boolhas_final_aura: boolhas_curry: boolhas_hammer: boolhit_by_paralyze: boolhas_screw_attack: boolstamina_dead: boolhas_tag: boolcan_not_ledge_grab: boolcan_not_teeter: boolvelocity_ignore_hitstun: booldeflection: boolthrow_data_param1: i32throw_data_param2: i32throw_data_param3: i32enable_turn_when_below_zero: f32character_float: boolenable_fast_fall: boolshorthop: boolenable_action_transition: boolspecials_movement: boolenable_glide: boolenable_jab_loop: boolenable_auto_jab: boolenable_jab_end: boollanding_lag: bool

Methods

impl<'a> ScriptRunner<'a>[src]

pub fn new(
    subaction_scripts: &[&'a ScriptAst],
    fighter_scripts: &'a [&'a ScriptAst],
    common_scripts: &'a [&'a ScriptAst],
    section_scripts: &'a [SectionScriptAst],
    fighter_data: &ArcFighterData
) -> ScriptRunner<'a>
[src]

Runs the action main, gfx, sfx and other scripts in subaction_scripts. all_scripts contains any functions that the action scripts need to call into. The returned runner has completed the first frame. Calling runner.step will advance to frame 2 and then frame 3 and so on.

pub fn step(&mut self, action_name: &str)[src]

Steps the main, gfx, sfx and other scripts by 1 game frame. action_name can be anything, it is just used for debugging.

Auto Trait Implementations

impl<'a> Send for ScriptRunner<'a>

impl<'a> Sync for ScriptRunner<'a>

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]