Exemple #1
0
        public AeSprite()
        {
            Animator    = new AeAnimator();
            RenderColor = new AeColor();

            CollisionHull.SetSize((int)SizeX, (int)SizeY);
            AddComponent(Animator);
            AddComponent(RenderColor);
        }
Exemple #2
0
        private void LoadAnimator(Texture2D texture)
        {
            AeAnimation      animation = new AeAnimation(texture, Animator);
            AeAnimationFrame frame1    = new AeAnimationFrame(0, 0, animation.Texture.Width, animation.Texture.Height, -1);

            SizeX = animation.Texture.Width;
            SizeY = animation.Texture.Height;
            animation.AddFrame(frame1);
            Animator.Add("default", animation);
            CollisionHull.SetSize((int)SizeX, (int)SizeY);
        }