Package ch.epfl.cs107.play.engine.actor
Class Foreground
java.lang.Object
ch.epfl.cs107.play.engine.actor.Entity
ch.epfl.cs107.play.engine.actor.Foreground
- All Implemented Interfaces:
Acoustics,Actor,Graphics,Updatable,Positionable
-
Constructor Summary
ConstructorsConstructorDescriptionForeground(Area area) Default Foreground Constructor by default the Background image is using the area title as file nameForeground(Area area, RegionOfInterest region) Extended Foreground Constructor by default the Background image is using the area title as file nameForeground(Area area, RegionOfInterest region, String name) Extended Foreground ConstructorForeground(String name, int width, int height, RegionOfInterest region) Alternative Foreground Constructor -
Method Summary
Methods inherited from class ch.epfl.cs107.play.engine.actor.Entity
getPosition, getTransform, getVelocity, setCurrentPosition
-
Constructor Details
-
Foreground
Default Foreground Constructor by default the Background image is using the area title as file name- Parameters:
area- (Area): ownerArea. Not null
-
Foreground
Extended Foreground Constructor by default the Background image is using the area title as file name- Parameters:
area- (Area): ownerArea. Not nullregion- (RegionOfInterest): region of interest in the image for the foreground, may be null
-
Foreground
Extended Foreground Constructor- Parameters:
area- (Area): ownerArea. Not nullregion- (RegionOfInterest): region of interest in the image for the foreground, may be nullname- (String): Background file name (i.e only the name, with neither path, nor file extension). Not null
-
Foreground
Alternative Foreground Constructor- Parameters:
name- (String): Background file name (i.e only the name, with neither path, nor file extension). Not nullwidth- (int): of the desired foregroundheight- (int): of the desired foregroundregion- (RegionOfInterest): region of interest in the image for the foreground, may be null
-
-
Method Details
-
draw
Description copied from interface:GraphicsRenders itself on specified canvas.- Parameters:
canvas- target, not null
-