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; }
AnimatedSprite animatedSprite; // create new animated sprite #endregion Fields #region Constructors // constructor public AnimatedSprite_Test() { animatedSprite = new AnimatedSprite(); // initiate animated sprite }
// constructor for testing public Player() { shipSprite = new AnimatedSprite(); }
// constructor public Player(Texture2D texture) { shipSprite = new AnimatedSprite(texture, 0, 0, 72, 16, 4); shipSprite.IsAnimating = false; }
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 }
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); }