/// <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. TutorialWorld tl = new TutorialWorld(Game, "Game"); CommandComponent cp = new CommandComponent(Game, tl); InputDefinitions input = InputDefinitions.CreateInput(Game); Camera cam = new Camera(Game, input, tl); // TODO: use this.Content to load your game content here }
public override void acceptInput(GameTime time, KeyboardState currentKeyboardState, MouseState currentMouseState, KeyboardState prevKeyboardState, MouseState prevMouseState) { this.currentMouseState = currentMouseState; if (currentMouseState.LeftButton.Equals(ButtonState.Pressed) && prevMouseState.LeftButton.Equals(ButtonState.Released)) { if (tutorialRect.Contains(currentMouseState.Position)) { SoundManager.getSound("click").playWithVariance(0, .25f, 0, SoundType.MONSTER); Game1.instance.world = null; World.universeProperties = new UniverseProperties("" + new Random(System.DateTime.Now.Millisecond).NextDouble() + "" + new Random(System.DateTime.Now.Minute).NextDouble() + "" + new Random((int)System.DateTime.Now.Ticks).NextDouble() + "" + new Random().NextDouble()); WorldBase world = new TutorialWorld(); Game1.instance.queuedSplashScreens.Add(new PlayerSelectScreen(MetaData.unlocks.ToArray(), world)); Card.setUpCards(); readyToContinue = true; Game1.isInTutorial = true; } if (newGameRect.Contains(currentMouseState.Position)) { SoundManager.getSound("click").playWithVariance(0, .25f, 0, SoundType.MONSTER); Game1.instance.world = null; World.universeProperties = new UniverseProperties("" + new Random(System.DateTime.Now.Millisecond).NextDouble() + "" + new Random(System.DateTime.Now.Minute).NextDouble() + "" + new Random((int)System.DateTime.Now.Ticks).NextDouble() + "" + new Random().NextDouble()); WorldBase world = Game1.instance.getWorldBasedOnDifficulty(0); Game1.instance.queuedSplashScreens.Add(new PlayerSelectScreen(MetaData.unlocks.ToArray(), world)); Card.setUpCards(); handleBottleAdditions(); Game1.instance.world = null; readyToContinue = true; Game1.isInTutorial = false; } if (continueRect.Contains(currentMouseState.Position) && allowResume) { SoundManager.getSound("click").playWithVariance(0, .25f, 0, SoundType.MONSTER); GameSaverAndLoader.load(Game1.selectedSaveSlot); handleBottleAdditions(); readyToContinue = true; Game1.isInTutorial = false; } if (exitRect.Contains(currentMouseState.Position)) { Game1.instance.Exit(); } } }