do wryly expressions the new way'

This commit is contained in:
2023-09-15 22:09:25 -06:00
parent 17bfc7dcdd
commit 88ed62d573
2 changed files with 11 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
# @install: lix --silent download "gh://github.com/kiss-lang/hollywoo#9be4e7a5a82dbd08990f2579cff386b180006f0e" into hollywoo/0.0.0/github/9be4e7a5a82dbd08990f2579cff386b180006f0e # @install: lix --silent download "gh://github.com/kiss-lang/hollywoo#cfa1d1779d5b620e35c16d7a4420cd88fbcb0fba" into hollywoo/0.0.0/github/cfa1d1779d5b620e35c16d7a4420cd88fbcb0fba
# @run: haxelib run-dir hollywoo "${HAXE_LIBCACHE}/hollywoo/0.0.0/github/9be4e7a5a82dbd08990f2579cff386b180006f0e" # @run: haxelib run-dir hollywoo "${HAXE_LIBCACHE}/hollywoo/0.0.0/github/cfa1d1779d5b620e35c16d7a4420cd88fbcb0fba"
-lib kiss -lib kiss
-lib kiss-tools -lib kiss-tools
-cp ${HAXE_LIBCACHE}/hollywoo/0.0.0/github/9be4e7a5a82dbd08990f2579cff386b180006f0e/src/ -cp ${HAXE_LIBCACHE}/hollywoo/0.0.0/github/cfa1d1779d5b620e35c16d7a4420cd88fbcb0fba/src/
-D hollywoo=0.0.0 -D hollywoo=0.0.0

View File

@@ -606,6 +606,12 @@
(new FlxTextFormatMarkerPair (new FlxTextFormat FlxColor.CYAN) "*") (new FlxTextFormatMarkerPair (new FlxTextFormat FlxColor.CYAN) "*")
])) ]))
(method showExpression [:ActorFlxSprite actor :String wryly]
// When an actor is associated with the line, check for an animation matching the wryly
(if wryly
(actor.playAnimation wryly)
(actor.playAnimation "neutral")))
(method showDialog [:String speakerName :SpeechType<ActorFlxSprite> type :String wryly :String text :Continuation cc] (method showDialog [:String speakerName :SpeechType<ActorFlxSprite> type :String wryly :String text :Continuation cc]
// TODO handle text messages, wrylies, off-screen, from-phone, etc. via (case type) // TODO handle text messages, wrylies, off-screen, from-phone, etc. via (case type)
// TODO attribute on-screen dialogue to the character's stageposition // TODO attribute on-screen dialogue to the character's stageposition
@@ -625,16 +631,9 @@
(startWaitForInput cc) (startWaitForInput cc)
(return))) (return)))
((OnScreen character) ((OnScreen character)
(set speakerNameX (+ character.actor.x (fHalf character.actor.width))) (set speakerNameX (+ character.actor.x (fHalf character.actor.width))))
// When an actor is associated with the line, check for an animation matching the wryly
(let [actor (the ActorFlxSprite character.actor)]
(if wryly
(actor.playAnimation wryly)
(actor.playAnimation "neutral"))))
((or (OffScreen actor) (VoiceOver actor) (TextMessage actor) (FromPhone actor)) ((or (OffScreen actor) (VoiceOver actor) (TextMessage actor) (FromPhone actor))
(if wryly null)
(actor.playAnimation wryly)
(actor.playAnimation "neutral")))
(otherwise)) (otherwise))
// Make a dialog box // Make a dialog box