public VaryingWidthSprite(ContentManager Content, string fileName, PixelUnit sourceX, PixelUnit sourceY, PixelUnit maxWidth, PixelUnit initialWidth, PixelUnit initialHeight) : base(Content, fileName, sourceX, sourceY, initialWidth, initialHeight) { this.maxWidth = maxWidth; }
public Sprite(ContentManager Content, string fileName, PixelUnit sourceX, PixelUnit sourceY, PixelUnit width, PixelUnit height) { //tex = Content.Load<Texture2D>(fileName); tex = Game1.LoadImage(Content, fileName, blackIsTransparent); sourceRect = new Rectangle(sourceX, sourceY, width, height); }
public ProjectileStarParticle(ContentManager Content, string spriteName, PixelUnit sourceX, PixelUnit sourceY, PixelUnit sourceWidth, PixelUnit sourceHeight, int fps, FrameUnit numFrames, GameUnit x, GameUnit y) : base(Content, spriteName, sourceX, sourceY, sourceWidth, sourceHeight, fps, numFrames, x, y) { }
public AnimatedSprite(ContentManager Content, string fileName, PixelUnit sourceX, PixelUnit sourceY, PixelUnit width, PixelUnit height, int fps, FrameUnit numberOfFrames) : base(Content, fileName, sourceX, sourceY, width, height) { frameTimer = new Timer(TimeSpan.FromMilliseconds(1000 / fps)); this.numberOfFrames = numberOfFrames; currentFrame = 0; numCompletedLoops = 0; }
public ImmobileSingleLoopParticle(ContentManager Content, string spriteName, PixelUnit sourceX, PixelUnit sourceY, PixelUnit sourceWidth, PixelUnit sourceHeight, int fps, FrameUnit numFrames, GameUnit x, GameUnit y) { this.x = x; this.y = y; sprite = new AnimatedSprite(Content, spriteName, sourceX, sourceY, sourceWidth, sourceHeight, fps, numFrames); }