Package ch.epfl.cs107.play.engine.actor
Class Entity
java.lang.Object
ch.epfl.cs107.play.engine.actor.Entity
- All Implemented Interfaces:
Acoustics,Actor,Graphics,Updatable,Positionable
- Direct Known Subclasses:
AreaEntity,Background,Foreground,GraphicsEntity,Grid,Path,Text
Basic Entity are simply actor and represented by a current exact position and its corresponding transform
-
Constructor Details
-
Entity
Default Entity constructor- Parameters:
position- (Coordinate): Initial position of the entity. Not null
-
-
Method Details
-
setCurrentPosition
Update the current position (i.e. after motion) after position change, the transform need to be updated to. Hence set it to null- Parameters:
v- (Vector): The new Position. Not null
-
getTransform
- Specified by:
getTransformin interfacePositionable- Returns:
- (Transform): affine transform, not null
-
getPosition
- Specified by:
getPositionin interfacePositionable- Returns:
- (Vector): origin, not null
-
getVelocity
- Specified by:
getVelocityin interfacePositionable- Returns:
- (Vector): linear velocity, not null
-