java.lang.Object
dev.aurumbyte.sypherengine.components.Component
dev.aurumbyte.sypherengine.components.Animator2D
A sprite animation class, using individual images as frames rather than a tileset, is experimental
- Since:
- v0.4.0
- Author:
- AurumByte
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescription(package private) intThe speed of animation to be played(package private) List<javafx.scene.image.Image>The frames to be animated uponFields inherited from class dev.aurumbyte.sypherengine.components.ComponentcomponentTag
- 
Constructor SummaryConstructorsConstructorDescriptionAnimator2D(List<javafx.scene.image.Image> frames) Create an animator with specified framesAnimator2D(javafx.scene.image.Image[] frames) Create an animator with specified frames
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddFrame(javafx.scene.image.Image frame) Adding a frame to the animationvoidaddFrames(javafx.scene.image.Image[] frames) Adding multiple frames to the animationintGetting how many frames are present in the animationList<javafx.scene.image.Image>Getting the frames present in the animationvoidremoveFrame(javafx.scene.image.Image frame) Removing a frame from the animationvoidremoveFrames(javafx.scene.image.Image[] frames) Removing multiple frames from the animationvoidrender(SypherEngine engine) Rendering the framesvoidSetting the frames present in the animationvoidsetFrames(javafx.scene.image.Image[] frames) Setting the frames present in the animationvoidupdate(float deltaTime) Updating the AnimationMethods inherited from class dev.aurumbyte.sypherengine.components.ComponentgetAABBComponent
- 
Field Details- 
framesList<javafx.scene.image.Image> framesThe frames to be animated upon
- 
animationSpeedint animationSpeedThe speed of animation to be played
 
- 
- 
Constructor Details- 
Animator2DCreate an animator with specified frames
- 
Animator2Dpublic Animator2D(javafx.scene.image.Image[] frames) Create an animator with specified frames
 
- 
- 
Method Details- 
updatepublic void update(float deltaTime) Updating the Animation 
- 
renderRendering the frames 
- 
addFramepublic void addFrame(javafx.scene.image.Image frame) Adding a frame to the animation - Parameters:
- frame- the frame to be added
- Since:
- 0.4.0
 
- 
removeFramepublic void removeFrame(javafx.scene.image.Image frame) Removing a frame from the animation - Parameters:
- frame- the frame to be removed
- Since:
- 0.4.0
 
- 
addFramespublic void addFrames(javafx.scene.image.Image[] frames) Adding multiple frames to the animation - Parameters:
- frames- the frames to be added
- Since:
- 0.4.0
 
- 
removeFramespublic void removeFrames(javafx.scene.image.Image[] frames) Removing multiple frames from the animation - Parameters:
- frames- the frames to be removed
- Since:
- 0.4.0
 
- 
getFrameCountpublic int getFrameCount()Getting how many frames are present in the animation - Since:
- 0.4.0
 
- 
getFramesGetting the frames present in the animation - Since:
- 0.4.0
 
- 
setFramesSetting the frames present in the animation - Since:
- 0.4.0
 
- 
setFramespublic void setFrames(javafx.scene.image.Image[] frames) Setting the frames present in the animation - Since:
- 0.4.0
 
 
-