Package de.gurkenlabs.litiengine.gui
Class SpeechBubble
java.lang.Object
de.gurkenlabs.litiengine.gui.SpeechBubble
- All Implemented Interfaces:
IRenderable,IUpdateable
public class SpeechBubble
extends java.lang.Object
implements IUpdateable, IRenderableField Summary
Fields Modifier and Type Field Description static SpeechBubbleAppearanceDEFAULT_APPEARANCEMethod Summary
Modifier and Type Method Description voidaddListener(SpeechBubbleListener listener)static SpeechBubblecreate(IEntity entity, java.awt.Font font, java.lang.String text)static SpeechBubblecreate(IEntity entity, java.awt.Font font, java.lang.String text, Sound typeSound)static SpeechBubblecreate(IEntity entity, java.lang.String text)static SpeechBubblecreate(IEntity entity, java.lang.String text, SpeechBubbleAppearance appearance, java.awt.Font font)SpeechBubbleAppearancegetAppearance()IEntitygetEntity()java.awt.FontgetFont()intgetTextDisplayTime()voidhide()static booleanisActive(IEntity entity)voidrender(java.awt.Graphics2D g)Renders the visual contents of this instance onto the provided graphics context.voidsetFont(java.awt.Font font)voidsetTextDisplayTime(int duration)voidupdate()This method is called by the game loop on all objects that are attached to the loop.
Field Details
Method Details
create
public static SpeechBubble create(IEntity entity, java.lang.String text, SpeechBubbleAppearance appearance, java.awt.Font font)create
create
create
public static SpeechBubble create(IEntity entity, java.awt.Font font, java.lang.String text, Sound typeSound)isActive
addListener
getEntity
getAppearance
getFont
public java.awt.Font getFont()render
public void render(java.awt.Graphics2D g)Description copied from interface:IRenderableRenders the visual contents of this instance onto the provided graphics context.If an
Entityimplements this interface, this method will be called right after the entity was rendered from the environment. Allowing for a custom rendering mechanism.This interface can be implemented in general by anything that should be rendered to the game's screen.
- Specified by:
renderin interfaceIRenderable- Parameters:
g- The current graphics object onto which this instance will render its visual contents.- See Also:
RenderEngine.renderEntity(Graphics2D, de.gurkenlabs.litiengine.entities.IEntity)
setFont
public void setFont(java.awt.Font font)getTextDisplayTime
public int getTextDisplayTime()setTextDisplayTime
public void setTextDisplayTime(int duration)update
public void update()Description copied from interface:IUpdateableThis method is called by the game loop on all objects that are attached to the loop. It's called on every tick of the loop and the frequency can be configured using theClientConfiguration.- Specified by:
updatein interfaceIUpdateable- See Also:
ClientConfiguration.setMaxFps(int)
hide
public void hide()
