public AeAnimation(Texture2D texture, AeAnimator parent, AeLinearAnimationGenerationParams linearAnimGenerationParams) { Texture = texture; Parent = parent; int currentX = 0; int width = linearAnimGenerationParams.Width; int height = linearAnimGenerationParams.Height; List <AeAnimationFrame> frames = new List <AeAnimationFrame>(); for (int i = 0; i < linearAnimGenerationParams.FrameCount; ++i) { frames.Add(new AeAnimationFrame(currentX, 0, width, height, linearAnimGenerationParams.FrameTime)); currentX += width; } AddFrames(frames.ToArray()); }
public AeAnimation(string pathToTexture, AeAnimator parent, AeAnimationFrame[] frames = null) : this(AeEngine.Singleton().TextureManager.LoadTexture(pathToTexture), parent, frames) { }
public AeAnimation(Texture2D texture, AeAnimator parent, AeAnimationFrame[] frames = null) { Texture = texture; Parent = parent; AddFrames(frames); }