/// Used to play animations for Stardust.CoreObject type objects and all objects that extend from it. In draw code of object make sure to use this info instead.
publicTexture2DobjectTexture;///Might not be necessary if I use the CoreObject texture sheet.
publicAnimationdefaultDrawFrame;
publicAnimationcurrentAnimation;
boolenabled;
/// <summary>
/// Constructor for Animation Manager class.
/// </summary>
/// <param name="ObjectTexture">The texture that will be used for the animation. This is typically the same as the object this class is attached to.</param>
/// <param name="DefaultFrame">This is used if no animations will be available to the animation manager.</param>
/// <param name="EnabledByDefault">Whether or not animations play by default. Default value is true.</param>
/// Update the animation frame once after drawing the object.
/// </summary>
publicvoidtickAnimation()
{
try
{
if(this.currentAnimation.frameDuration==-1||this.enabled==false||this.currentAnimation==this.defaultDrawFrame)return;//This is if this is a default animation or the animation stops here.
if(dummyList.Count==0)ModCore.ModMonitor.Log("Error: Current animation "+AnimationName+" has no animation frames associated with it.");
if(dummyList.Count>dummyList.Count)ModCore.ModMonitor.Log("Error: Animation frame "+StartingFrame+" is outside the range of provided animations. Which has a maximum count of "+dummyList.Count);
returnfalse;
}
}
else
{
ModCore.ModMonitor.Log("Error setting animation: "+AnimationName+" animation does not exist in list of available animations. Did you make sure to add it in?");