Ejemplo n.º 1
0
 public Bullet(Texture2D texture)
 {
     asRight = new AnimatedSprite(texture, 0, 0, 16, 1, 1);
     asRight.IsAnimating = false;
     asLeft = new AnimatedSprite(texture, 16, 0, 16, 1, 1);
     asRight.IsAnimating = false;
     iFacing = 0;
     iX = 0;
     iY = 0;
     bActive = false;
 }
Ejemplo n.º 2
0
        public Enemy(Texture2D texture,
              int X, int Y, int W, int H, int Frames)
        {
            asSprite = new AnimatedSprite(texture, X, Y, W, H, Frames);

            //50 50 chance of going in either direction
            int direction = rndGen.Next(0,2);
            if(direction == 0){
                iDirection = 1;
            }
        }
Ejemplo n.º 3
0
 public Player(Texture2D texture)
 {
     asSprite = new AnimatedSprite(texture, 0, 0, 72, 16, 4);
     asSprite.IsAnimating = false;
 }
Ejemplo n.º 4
0
 public Explosion(Texture2D texture,
          int X, int Y, int W, int H, int Frames)
 {
     asSprite = new AnimatedSprite(texture, X, Y, W, H, Frames);
     asSprite.FrameLength = 0.05f;
 }
Ejemplo n.º 5
0
 public Enemy(Texture2D texture,
       int X, int Y, int W, int H, int Frames)
 {
     asSprite = new AnimatedSprite(texture, X, Y, W, H, Frames);
 }