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