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, float width, float height, int regionWidth, int regionHeight) OrientedAnimation(String name, int duration, AreaEntity parent, Vector anchor, Orientation[] order, int nbFrames, float width, float height, int regionWidth, int regionHeight, boolean repeat) -
Method Summary
-
Constructor Details
-
OrientedAnimation
-
OrientedAnimation
-
OrientedAnimation
public OrientedAnimation(String name, int duration, AreaEntity parent, Vector anchor, Orientation[] order, int nbFrames, float width, float 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, float width, float height, int regionWidth, int regionHeight)
-
-
Method Details
-
update
-
draw
-
reset
public void reset() -
orientate
Deprecated. -
isCompleted
public boolean isCompleted() -
setWidth
public void setWidth(float width) -
setHeight
public void setHeight(float height) -
setAnchor
-
getCurrentFrame
public int getCurrentFrame()
-