public SpriteManager(Texture2D texture, Vector2 position, Vector2 screen, Game1 aGame, Asis anAsis, Laser aLaser, Enemy aEnemy, SoundEffect aLaserSoundEffect, SoundEffect aBackwardsLaserSoundEffect) : base(texture, position) { myPosition = position; myScreenSize = screen; myGame = aGame; Asis = anAsis; Laser = aLaser; redEnemy = aEnemy; LaserSoundEffect = aLaserSoundEffect; BackwardsLaserSoundEffect = aBackwardsLaserSoundEffect; myState = new IdleState(this); TimeStack = new Stack(); SetUpInput(); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); Asis Asis = new Asis(Content.Load<Texture2D>("Asis"), new Vector2(0, 0), new Vector2(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight)); Laser Laser = new Laser(Content.Load<Texture2D>("Laser"), new Vector2(0, 0), new Vector2(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight)); Enemy redEnemy = new Enemy(Content.Load<Texture2D>("enemy-red"), new Vector2(0, 0), new Vector2(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight)); SpriteManager SpriteManager = new SpriteManager(Content.Load<Texture2D>("Laser"), new Vector2(-1000, -1000), new Vector2(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight), this, Asis, Laser, redEnemy, Content.Load<SoundEffect>("LaserSoundEffect"), Content.Load<SoundEffect>("LaserSoundEffectBackwards")); mySprites.Add(Asis); mySprites.Add(Laser); mySprites.Add(redEnemy); mySprites.Add(SpriteManager); }