Class ContainerBasedEntity<T extends Entity<?>>
java.lang.Object
com.codingame.gameengine.module.entities.Entity<T>
com.codingame.gameengine.module.entities.ContainerBasedEntity<T>
- Type Parameters:
T
- a subclass inheriting Entity, used in order to return this as a T instead of aContainerBasedEntity
.
- Direct Known Subclasses:
BufferedGroup
,Group
-
Method Summary
Methods inherited from class com.codingame.gameengine.module.entities.Entity
getAlpha, getId, getMask, getParent, getRotation, getScaleX, getScaleY, getSkewX, getSkewY, getX, getY, getZIndex, isVisible, requireValidAlpha, requireValidColor, self, set, set, setAlpha, setAlpha, setMask, setMask, setRotation, setRotation, setScale, setScale, setScaleX, setScaleX, setScaleY, setScaleY, setSkewX, setSkewX, setSkewY, setSkewY, setVisible, setX, setX, setY, setY, setZIndex
-
Method Details
-
remove
Separates the given entity from thisContainerBasedEntity
.- Parameters:
entity
- theEntity
to be removed from this ContainerBasedEntity, if it is part of it.
-
add
Adds the givenEntity
instances to thisContainerBasedEntity
.The entities will be displayed within a container controlled by this
ContainerBasedEntity
.- Parameters:
entities
- theEntity
instances to be added to this ContainerBasedEntity.- Throws:
IllegalArgumentException
- if at least one givenEntity
is already in aContainerBasedEntity
.
-