Esempio n. 1
0
 public Ammo(Texture2D texture)
 {
     asBullet = new AnimatedSprite(texture, 0, 0, 16, 3, 1);
     //loads ammo from image: 16 pixels by 3 pixels at default location 0,0
     aLocation.X = 0f;
     aLocation.Y = 0f;
     ammoActive = false;
 }
Esempio n. 2
0
        AnimatedSprite animatedSprite; // create new animated sprite

        #endregion Fields

        #region Constructors

        // constructor
        public AnimatedSprite_Test()
        {
            animatedSprite = new AnimatedSprite(); // initiate animated sprite
        }
Esempio n. 3
0
 // constructor for testing
 public Player()
 {
     shipSprite = new AnimatedSprite();
 }
Esempio n. 4
0
 // constructor
 public Player(Texture2D texture)
 {
     shipSprite = new AnimatedSprite(texture, 0, 0, 72, 16, 4);
     shipSprite.IsAnimating = false;
 }
Esempio n. 5
0
        private int yPosition = 0; // holds y position of the boss

        #endregion Fields

        #region Constructors

        // constructor for the Boss
        public Boss(Texture2D texture, int X, int Y, int W, int H, int Frames)
        {
            asSprite = new AnimatedSprite(texture, X, Y, W, H, Frames); // initiate sprite with texture in the correct position with correct size
        }
Esempio n. 6
0
        private int yPosition = 0; // enemy's y position

        #endregion Fields

        #region Constructors

        // Constructor for Enemy2
        public Enemy2(Texture2D texture, int X, int Y, int W, int H, int Frames)
        {
            asSprite = new AnimatedSprite(texture, X, Y, W, H, Frames);
        }