[][src]Trait sulis_state::script::script_callback::ScriptCallback

pub trait ScriptCallback {
    fn on_held_changed(&self) { ... }
fn on_effect_applied(&self, _effect: ScriptAppliedEffect) { ... }
fn on_menu_select(&self, _value: ScriptMenuSelection) { ... }
fn on_removed(&self) { ... }
fn on_damaged(
        &self,
        _targets: &ScriptEntitySet,
        _hit_kind: HitKind,
        _damage: Vec<(DamageKind, u32)>
    ) { ... }
fn after_defense(
        &self,
        _targets: &ScriptEntitySet,
        _hit_kind: HitKind,
        _damage: Vec<(DamageKind, u32)>
    ) { ... }
fn before_defense(&self, _targets: &ScriptEntitySet) { ... }
fn before_attack(&self, _targets: &ScriptEntitySet) { ... }
fn after_attack(
        &self,
        _targets: &ScriptEntitySet,
        _hit_kind: HitKind,
        _damage: Vec<(DamageKind, u32)>
    ) { ... }
fn on_anim_complete(&self) { ... }
fn on_anim_update(&self) { ... }
fn on_round_elapsed(&self) { ... }
fn on_moved(&self) { ... }
fn on_surface_round_elapsed(&self) { ... }
fn on_moved_in_surface(&self, _target: usize) { ... }
fn on_entered_surface(&self, _target: usize) { ... }
fn on_exited_surface(&self, _target: usize) { ... } }

A trait representing a callback that will fire a script when called. In lua scripts, CallbackData is constructed to use this trait.

Provided methods

fn on_held_changed(&self)

fn on_effect_applied(&self, _effect: ScriptAppliedEffect)

fn on_menu_select(&self, _value: ScriptMenuSelection)

fn on_removed(&self)

fn on_damaged(
    &self,
    _targets: &ScriptEntitySet,
    _hit_kind: HitKind,
    _damage: Vec<(DamageKind, u32)>
)

fn after_defense(
    &self,
    _targets: &ScriptEntitySet,
    _hit_kind: HitKind,
    _damage: Vec<(DamageKind, u32)>
)

fn before_defense(&self, _targets: &ScriptEntitySet)

fn before_attack(&self, _targets: &ScriptEntitySet)

fn after_attack(
    &self,
    _targets: &ScriptEntitySet,
    _hit_kind: HitKind,
    _damage: Vec<(DamageKind, u32)>
)

fn on_anim_complete(&self)

fn on_anim_update(&self)

fn on_round_elapsed(&self)

fn on_moved(&self)

fn on_surface_round_elapsed(&self)

fn on_moved_in_surface(&self, _target: usize)

fn on_entered_surface(&self, _target: usize)

fn on_exited_surface(&self, _target: usize)

Loading content...

Implementors

impl ScriptCallback for CallbackData[src]

fn on_surface_round_elapsed(&self)[src]

when called, this computes the current target set and sends it to the lua function based on the surface state

Loading content...