protected override void OnUpdate(GameTime time) { base.OnUpdate(time); titleScreen.Update(time); if (titleScreen.Player != null) { systemState.ReturnToTitle = false; BeginGame?.Invoke(titleScreen.Player); } }
private void Keyboard_KeyPress(object sender, KeyPressEventArgs e) { musicInstance.Stop(); var player = new Player("Davey"); player.MapID = 1; player.X = 126; player.Y = 52; player.StoryData = new LobStory(); player.Items[LobItem.FalconFeather] = 1; BeginGame?.Invoke(player); }
private void Mouse_MouseUp(object sender, MouseButtonEventArgs e) { if (hideTitle) { hideTitle = false; timeSinceMouseMove = 0; return; } if (mousex > 100 - 20 && mousex < 500 && mousey > 100 && mousey < 130) { GameState gameState = gameStateFactory.CreateGameState(); gameState.world = beginningWorld; gameState.level = beginningLevel; BeginGame?.Invoke(gameState); } if (mousex > 100 - 20 && mousex < 500 && mousey > 160 && mousey < 190) { SceneStack.Remove(this); } if (mousex > 100 - 20 && mousex < 500 && mousey > 250 && mousey < 280) { config.BackgroundScroll = !config.BackgroundScroll; game.bgspeed = config.BackgroundScroll ? 50.0f : 0.0f; } if (mousex > 100 - 20 && mousex < 500 && mousey > 280 && mousey < 320) { config.PlayMusic = !config.PlayMusic; if (config.PlayMusic) { StartTitleMusic(); } else { MediaPlayer.Stop(); } } }