public class MsgSystem
extends java.lang.Object
Constructor and Description |
---|
MsgSystem(GameplayScreen gameplay) |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String message)
Adds a message with the sender "System"
|
void |
add(java.lang.String message,
java.lang.String sender) |
void |
add(java.lang.String message,
java.lang.String sender,
int importance) |
void |
dispose() |
boolean |
executeCommand(java.lang.String command)
Tries executing a command
|
java.lang.String |
getLastMessage()
Returns the last Message
|
java.lang.String |
getLastMessage(java.lang.String sender)
Returns the last Message
|
boolean |
isActive()
Is the window open?
|
void |
render(View view)
Draws the Messages
|
void |
setText(java.lang.String text)
Set the text in the box.
|
void |
update(float delta)
Updates the Message System.
|
void |
viewInit(com.badlogic.gdx.scenes.scene2d.ui.Skin skin,
int xPos,
int yPos)
"Handshake" with the view rendering the scene.
|
public MsgSystem(GameplayScreen gameplay)
gameplay
- public void viewInit(com.badlogic.gdx.scenes.scene2d.ui.Skin skin, int xPos, int yPos)
skin
- xPos
- yPos
- public void add(java.lang.String message)
message
- public void add(java.lang.String message, java.lang.String sender)
message
- sender
- public void add(java.lang.String message, java.lang.String sender, int importance)
message
- sender
- importance
- public void update(float delta)
delta
- public void render(View view)
view
- public boolean isActive()
public java.lang.String getLastMessage()
public java.lang.String getLastMessage(java.lang.String sender)
sender
- filter by the sender, e.g. if you want the last message of a specific playerpublic void setText(java.lang.String text)
text
- public boolean executeCommand(java.lang.String command)
command
- public void dispose()