public AeSprite() { Animator = new AeAnimator(); RenderColor = new AeColor(); CollisionHull.SetSize((int)SizeX, (int)SizeY); AddComponent(Animator); AddComponent(RenderColor); }
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); }