Add speech bubble functionality to Actor class#29
Merged
Conversation
Adds showSpeechBubble(text, duration) async method that renders a white rounded-rect bubble with tail above the actor. Duration is in seconds; passing -1 keeps the bubble visible until hideSpeechBubble() is called manually. The bubble follows the actor's bob and shake animations. https://claude.ai/code/session_01H51CcJUAJW28hdAUZT4Rdg
Adds text input, duration input, and three buttons (Show Bubble, Show Bubble (-1), Hide Bubble) to the actors test page for interactive testing of the new speech bubble feature. https://claude.ai/code/session_01H51CcJUAJW28hdAUZT4Rdg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added speech bubble display capability to the Actor class, allowing actors to show temporary or persistent text bubbles above their heads during gameplay.
Key Changes
GraphicsandTextfrom pixi.js to support speech bubble renderingspeechBubble: Container holding the bubble graphics and textspeechBubbleTimeout: Timer reference for auto-hiding bubblesresolveSpeechBubble: Promise resolver for async bubble displayshowSpeechBubble(text, duration)method that:hideSpeechBubble()method that:update()method to position speech bubbles relative to the actor, accounting for sprite height and screen shake effectsImplementation Details
https://claude.ai/code/session_01H51CcJUAJW28hdAUZT4Rdg