Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
 public AeAnimation(string pathToTexture, AeAnimator parent, AeAnimationFrame[] frames = null)
     : this(AeEngine.Singleton().TextureManager.LoadTexture(pathToTexture), parent, frames)
 {
 }
Ejemplo n.º 3
0
 public AeAnimation(Texture2D texture, AeAnimator parent, AeAnimationFrame[] frames = null)
 {
     Texture = texture;
     Parent  = parent;
     AddFrames(frames);
 }