Package ch.epfl.cs107.play.engine.actor
Class OrientedAnimation
java.lang.Object
ch.epfl.cs107.play.engine.actor.OrientedAnimation
-
Constructor Summary
ConstructorsConstructorDescriptionOrientedAnimation(Animation[] animations, AreaEntity parent) OrientedAnimation(String name, int duration, AreaEntity parent, Vector anchor) OrientedAnimation(String name, int duration, AreaEntity parent, Vector anchor, Orientation[] order, int nbFrames, int width, int height, int regionWidth, int regionHeight) OrientedAnimation(String name, int duration, AreaEntity parent, Vector anchor, Orientation[] order, int nbFrames, int width, int height, int regionWidth, int regionHeight, boolean repeat) -
Method Summary
Modifier and TypeMethodDescriptionvoidRenders itself on specified canvas.booleanvoidorientate(Orientation orientation) Deprecated.voidreset()voidupdate(float deltaTime) Simulates a single time step.
-
Constructor Details
-
OrientedAnimation
-
OrientedAnimation
-
OrientedAnimation
public OrientedAnimation(String name, int duration, AreaEntity parent, Vector anchor, Orientation[] order, int nbFrames, int width, int height, int regionWidth, int regionHeight, boolean repeat) - Parameters:
name- (String): the name of the imageparent- (Positionable): parent of this, not nullanchor- (Vector) : image anchor, not nullorder- (Orientation[]): order of the frames in the imagenbFrames- (int): number of frames in each rowwidth- (int): actual image width, before transformationheight- (int): actual image height, before transformationregionWidth- (int): width of frame (number of pixels in the image)regionHeight- (int): height of frame (number of pixels in the image)repeat- (boolean : true if the animation must be repeated
-
OrientedAnimation
public OrientedAnimation(String name, int duration, AreaEntity parent, Vector anchor, Orientation[] order, int nbFrames, int width, int height, int regionWidth, int regionHeight)
-
-
Method Details
-
update
public void update(float deltaTime) Description copied from interface:UpdatableSimulates a single time step. Note: Need to be Override -
draw
Description copied from interface:GraphicsRenders itself on specified canvas. -
reset
public void reset() -
orientate
Deprecated. -
isCompleted
public boolean isCompleted()
-