/// <summary> /// Initializes a new instance of the Texture class. /// </summary> /// <param name="animationMode">A <see cref="FrameAnimationMode"/> representing the way the frames should be animated.</param> /// <param name="frames">The frames of the texture.</param> /// <param name="scrollVector">A <see cref="PointF"/> representing the scroll vector.</param> /// <param name="gpuPrograms">A collection of GPU programs.</param> public Texture(FrameAnimationMode animationMode, IEnumerable <TextureFrame> frames, PointF scrollVector, IEnumerable <GpuProgram> gpuPrograms) { this.FrameAnimationMode = animationMode; this.frames = new List <TextureFrame>(frames); this.ScrollVector = scrollVector; this.GpuPrograms = new List <GpuProgram>(gpuPrograms); }
/// <summary> /// Initializes a new instance of the Texture class. /// </summary> /// <param name="animationMode">A <see cref="FrameAnimationMode"/> representing the way the frames should be animated.</param> /// <param name="frames">The frames of the texture.</param> public Texture(FrameAnimationMode animationMode, IEnumerable <TextureFrame> frames) : this(animationMode, frames, PointF.Empty) { }
/// <summary> /// Initializes a new instance of the Texture class. /// </summary> /// <param name="animationMode">A <see cref="FrameAnimationMode"/> representing the way the frames should be animated.</param> /// <param name="frames">The frames of the texture.</param> public Texture(FrameAnimationMode animationMode, params TextureFrame[] frames) : this(animationMode, (IEnumerable <TextureFrame>)frames) { }
/// <summary> /// Initializes a new instance of the Texture class. /// </summary> /// <param name="animationMode">A <see cref="FrameAnimationMode"/> representing the way the frames should be animated.</param> /// <param name="frames">The frames of the texture.</param> /// <param name="scrollVector">A <see cref="PointF"/> representing the scroll vector.</param> public Texture(FrameAnimationMode animationMode, IEnumerable <TextureFrame> frames, PointF scrollVector) : this(animationMode, frames, scrollVector, Enumerable.Empty <GpuProgram>()) { }