public abstract class Entity extends java.lang.Object implements Drawable, java.io.Serializable
Constructor and Description |
---|
Entity() |
Modifier and Type | Method and Description |
---|---|
void |
changePlayer(Player player)
Changes the owner of the entity without changing the players'
list of owned entities.
|
void |
drawInventory(java.awt.Graphics g,
boolean isVisible)
Method invoked to draw the entity in an inventory.
|
Player |
getPlayer()
Returns the owner of the entity.
|
void |
setPlayer(Player player)
Modifies the owner of the entity.
|
public final Player getPlayer()
public final void setPlayer(Player player)
player
- Owner of the entity.public final void changePlayer(Player player)
player
- The new owner.public void drawInventory(java.awt.Graphics g, boolean isVisible)
g
- Graphics context used for rendering.isVisible
- Whether or not the entity is visible by the local player.