Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
 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)
 {
 }
Esempio n. 6
0
 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 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)
 {
 }
Esempio n. 8
0
 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);
 }
 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);
 }