Files
stickman/scripts/speech_word_effect.gd
T
ryan 6666173c4f Implement speech style toolbar live-edit refinements and whole speech show controls
- Added a new specification for the speech style toolbar live-edit, detailing immediate style application, scoped effect demonstration, and hover feedback.
- Introduced refinements to the speech style toolbar, including improved chooser sizing, exclusive stage editing during speech composition, and removal of redundant controls.
- Documented new stage controls for managing how the whole speech shows, including options for bubble arrangement, word appearance, and bubble motion.
- Created a new log file for speech padding syntax to track engine versioning.
2026-10-03 14:49:22 -04:00

19 lines
676 B
GDScript

extends RichTextEffect
## Per-word motions driven entirely by the owning speech group's saved clock.
var bbcode: String = "speechmotion"
func _process_custom_fx(char_fx: CharFXTransform) -> bool:
var env: Dictionary = char_fx.env
var kind: String = String(env.get("kind", ""))
var clock: float = float(env.get("clock", 0.0))
var index: float = float(char_fx.relative_index)
match kind:
"shake":
char_fx.offset += Vector2(sin(clock * 34.0 + index * 11.0) * 2.8, cos(clock * 41.0 + index * 7.0) * 1.8)
"wave":
char_fx.offset.y += sin(clock * 11.0 - index * 0.72) * 6.0
"bounce":
char_fx.offset.y -= absf(sin(clock * 7.0 - index * 0.42)) * 8.0
return true