/// <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() { IsMouseVisible = true; screen = new Level(); screenSolution = new Vector2(); rowsAndColumns = new Vector2(24, 14); // TODO: Add your initialization logic here screenSolution.X = GraphicsDevice.Viewport.Width; screenSolution.Y = GraphicsDevice.Viewport.Height; statusScreen = new StatusScreen(); user = new User(); userInput = new Input(); tileBound = new Vector2(80, 80); enemyList = new List <Enemy>(); turtleAnimation = new Animation(); flyingBombAnimation = new Animation(); mushroomStripAnimation = new Animation(); textures = new Texture2D[5]; myBar = new Toolbar(); toolbartextures = new Texture2D[6]; enemySpawnX = 1000; enemySpawnY = 100; base.Initialize(); }
public void Initialize(User user, Level screen, StatusScreen statusScreen, Toolbar toolbar) { m_toolbar = toolbar; m_user = user; m_level = screen; m_currentMouseState = Mouse.GetState(); m_previousMouseState = m_currentMouseState; m_currentKeyboardState = Keyboard.GetState(); m_previousKeyboardState = m_currentKeyboardState; m_tileWindow = new TileWindow(); m_tileWindow.Initialize(m_user); currenState = States.SetTile; m_statusScreen = statusScreen; }