/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { Window.Title = "Worlds no. 1 game"; _array = new Texture2D[6]; back = new Background(spriteBatch); cutes = new Cutes(spriteBatch); gem = new Gem(spriteBatch); bug = new Bug(spriteBatch, gem); IsMouseVisible = true; back.Initialize(); cutes.Initialize(); bug.Initialize(); gem.Initialize(); base.Initialize(); }
public Bug(SpriteBatch spriteBatch, Gem gem) { this.spriteBatch = spriteBatch; this.gem = gem; }