Package com.starpoints.animation
Class Animation
- java.lang.Object
-
- com.starpoints.animation.Animation
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
FigureAnimation
,FigureMoveAnimation
,FigureRocketAnimation
,FigureShieldedAnimation
,ItemAnimation
,PointAnimation
,PointChainExplodeAnimation
,PointColorAnimation
public abstract class Animation extends java.lang.Object implements java.io.Serializable
Abstract superclass for Animation infos for things and points.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
duration
The duration in updates this animation object should be kept in the AnimationInfo.protected int
startDuration
The duration when created.
-
Constructor Summary
Constructors Constructor Description Animation(int duration)
Creates a new Animation with the given duration in round segments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Creates a clone of this animation.protected Animation
getCopyForNextAnimation()
Gets a copy for the next AnimationInfo.int
getLifecycleIndex()
Gets the current lifecycle index of this animation.
-
-
-
Method Detail
-
getLifecycleIndex
public int getLifecycleIndex()
Gets the current lifecycle index of this animation.- Returns:
- The Animation Lifecycle index.
-
getCopyForNextAnimation
protected Animation getCopyForNextAnimation()
Gets a copy for the next AnimationInfo.- Returns:
- This instance with a reduced duration or null, if end of lifecyle is reached.
-
clone
public java.lang.Object clone()
Creates a clone of this animation.- Overrides:
clone
in classjava.lang.Object
- Returns:
- The clone.
-
-