public GameStage() { CurrentLevel = Level.LEVEL1; switch(CurrentLevel) { case Level.LEVEL1: level1 = new Level1(); break; case Level.LEVEL2: level2 = new Level2(); break; } }
public GameStage() { CurrentLevel = Level.LEVEL1; switch (CurrentLevel) { case Level.LEVEL1: level1 = new Level1(); break; case Level.LEVEL2: level2 = new Level2(); break; } }
public void render(GameTime gameTime, SpriteBatch batch) { switch (CurrentLevel) { case Level.LEVEL1: if (!Level1.initialized) { level1.init(); } level1.render(gameTime, batch); break; case Level.LEVEL2: if (!Level2.initialized) { level2 = new Level2(); level2.init(); } level2.render(gameTime, batch); break; } }