public abstract class GameScreenEntity extends Object implements Entity, GameScreen
Entity
that also implements GameScreen
Constructor and Description |
---|
GameScreenEntity(int id) |
Modifier and Type | Method and Description |
---|---|
void |
addComponent(Component component)
|
void |
addEntityListener(EntityListener listener)
Adds an
EntityListener to this Entity |
<T> List<T> |
getComponents(Class<T> clazz)
Returns all
Component s that implement the specified the class or
interface |
int |
getId()
Returns the identifier of the screen
|
void |
interpolateScreenComponents(GameContainer gc,
float alpha) |
<T extends Component> |
removeAllComponentsOfType(Class<T> clazz)
Removes all
Component s that implement a specific type |
void |
removeComponent(Component component)
|
void |
removeEntityListener(EntityListener listener)
Removes an
EntityListener from this Entity |
void |
renderScreenComponents(GameContainer gc,
Graphics g) |
void |
updateScreenComponents(GameContainer gc,
ScreenManager<? extends GameScreen> screenManager,
float delta) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initialise, interpolate, postTransitionIn, postTransitionOut, preTransitionIn, preTransitionOut, render, update
public void updateScreenComponents(GameContainer gc, ScreenManager<? extends GameScreen> screenManager, float delta)
public void interpolateScreenComponents(GameContainer gc, float alpha)
public void renderScreenComponents(GameContainer gc, Graphics g)
public void addComponent(Component component)
Entity
addComponent
in interface Entity
component
- An instance of Component
public <T> List<T> getComponents(Class<T> clazz)
Entity
Component
s that implement the specified the class or
interfacepublic void removeComponent(Component component)
Entity
removeComponent
in interface Entity
component
- The Component
to removepublic <T extends Component> List<T> removeAllComponentsOfType(Class<T> clazz)
Entity
Component
s that implement a specific typeremoveAllComponentsOfType
in interface Entity
clazz
- The Class
to search forpublic void addEntityListener(EntityListener listener)
Entity
EntityListener
to this Entity
addEntityListener
in interface Entity
listener
- The EntityListener
to addpublic void removeEntityListener(EntityListener listener)
Entity
EntityListener
from this Entity
removeEntityListener
in interface Entity
listener
- The EntityListener
to be removedpublic int getId()
GameScreen
getId
in interface GameScreen
Copyright © 2014. All rights reserved.