Package ecs
Class SpriteAnimation
java.lang.Object
ecs.Component
ecs.SpriteAnimation
- All Implemented Interfaces:
Comparable<Component>
Azurite
- Since:
- 26.07.2021
- Author:
- Juyas
-
Nested Class Summary
Nested classes/interfaces inherited from class ecs.Component
Component.ComponentOrder
-
Field Summary
Fields inherited from class ecs.Component
gameObject
-
Constructor Summary
ConstructorDescriptionSpriteAnimation
(SpriteRenderer renderer, Sprite baseImage, float timePerSprite) -
Method Summary
Modifier and TypeMethodDescriptionvoid
nextAnimation
(String nextAnimation, int nextRepetitions) void
setAnimation
(String name, List<Sprite> sprites) void
setAnimationEndEvent
(Consumer<String> animationEndEvent) void
setBaseImage
(Sprite baseImage) void
setCurrentRepetition
(int currentRepetition) void
setTimePerSprite
(float timePerSprite) void
start()
Called once on Component initialization.void
switchAnimation
(boolean instant) void
update
(float dt) Called once per frame for each Component
-
Constructor Details
-
SpriteAnimation
-
-
Method Details
-
setAnimation
-
setBaseImage
-
setCurrentRepetition
public void setCurrentRepetition(int currentRepetition) -
setTimePerSprite
public void setTimePerSprite(float timePerSprite) -
nextAnimation
-
switchAnimation
public void switchAnimation(boolean instant) -
setAnimationEndEvent
-
start
public void start()Description copied from class:Component
Called once on Component initialization. -
update
public void update(float dt) Description copied from class:Component
Called once per frame for each Component
-