API Reference
For the most up-to-date API details, see
docs/API.mdin the repository.
This page provides a high-level overview of the public API.
GameFeelFlow
play(effect, target, params)play_combo(combo, target, params)play_global(effect, params)— for targetless effects such asfreeze_framestop(target)/stop_all(target)— both stop GFFPlayer-owned and global-stack effects on the target (and descendants)emit(event, data)listen(event, callback)unlisten(event, callback)register_effect(name, effect)/get_effect(name)get_combo(name)
GFFPlayer
play(effect, params)play_combo(combo, params)play_all(params)stop()stop_effect(name)is_playing()is_effect_playing(name)add_combo(combo, key)remove_combo(key)register_combo_from_file(path, key)
GFFCombo
- Static factories:
hit_light(),hit_medium(),hit_heavy(),hit_critical(),death(),death_explosion(),pickup(),pickup_coin(),pickup_health(),pickup_power(),explosion(),explosion_small(),explosion_large(),ui_button_press(),ui_notification() add_entry(effect, start_time, duration, track_idx)execute(target, params)
GFFEffect
apply(target, params)stop()is_playing()- Signals:
started,finished - Restore:
restore_after_play,restore_mode(IMMEDIATE/GRADUAL/CUSTOM),restore_duration - Overlap:
overlap_strategy,max_concurrent - Loop:
loop_count,loop_mode,loop_delay
Formerly named
GFFFeedback.
GFFEffectStack
Owned by each GFFPlayer (and used by the global singleton path). Manages overlap, queueing, and stop-by-target.
Formerly named
GFFFeedbackStack.
GFFParams
create(intensity, duration)from_dict(dict)with_float(key, value)/get_float(key, default)with_int(key, value)/get_int(key, default)with_color(key, value)/get_color(key, default)with_string(key, value)/get_string(key, default)with_variant(key, value)/get_variant(key, default)
Common param keys: intensity, duration, amplitude, frequency, color / flash_color, target_alpha, target_value.