public override void OnPlayerAction(Tile tile, Player player) { string[] commands = GetCommands(source); if (commands != null && commands.Length > 1) { if (commands[0] == "trigger") { StoryTracker.AddTrigger(commands[1]); } } base.OnPlayerAction(tile, player); }
public override void ShowDialog(string code, int optionChosen) { switch (code) { case "greenhills01-wakeup": TMBAW_Game.Dialog.Say("Dot....", "greenhills01-wakeup2", null); break; case "greenhills01-wakeup2": TMBAW_Game.Dialog.Say("Are you ok?\n\n Can you hear me? DOT!!!!!!!!!!!!", "greenhills01-fadein", null); break; case "greenhills01-fadein": Overlay.FadeIn(); StoryTracker.AddTrigger("hasWokenUp"); break; case "greenhills01-whathappened": TMBAW_Game.Dialog.Say("Oh thank the creator! I thought I would never hear from you again... \n...\n Where are you?", "greenhills01-whathappened2", new[] { "I have no idea...", "I might be in danger", "There are green things all around me!" }); break; case "greenhills01-whathappened2": TMBAW_Game.Dialog.Say("I am still at the spaceship, master, but it appears to be completely unoperational. The blast right before the time jump seems to have thrown us off course by a couple thousand years, which is not something the spaceship was ever designed for.", "greenhills01-whathappened3", null); break; case "greenhills01-whathappened3": TMBAW_Game.Dialog.Say("I'll send you the location of the ship. If you come back quickly we might be able to find a way out of this time period!", "greenhills01-whathappened4", null); break; case "greenhills01-whathappened4": StoryTracker.AddTrigger("sentCoordinates"); break; case "greenHills01-cave": TMBAW_Game.Dialog.Say("There seems to be a light source in this cave. Dot, I think we are not alone on this planet.", null, null); break; case "greenHills01-door": TMBAW_Game.Dialog.Say("My sensors are reading multiple life signatures behind this door. I cannot determine their friendliness, and I cannot communicate with you if you proceed into the depths of the cave. I advise you to find another way around.", null, null); break; default: break; } }
protected override void Update(GameTime gameTime) { #if !DEBUG if (!IsActive) { return; } #endif if (_wantsToQuit) { Exit(); } SteamAPI.RunCallbacks(); GameTime = gameTime; GameUpdateCalled?.Invoke(); InputSystem.Update(); _frameRateTimer += gameTime.ElapsedGameTime.TotalMilliseconds; if (_frameRateTimer > 1000f) { FPS = _totalFrames; _totalFrames = 0; _frameRateTimer = 0; } IsMouseVisible = false; Cursor.Update(); SoundtrackManager.Update(); MessageBox.Update(); if (MessageBox.IsActive) { return; } TextInputBox.Update(); if (TextInputBox.IsActive) { return; } GameDebug.Update(); if (GameDebug.IsTyping) { return; } PauseMenu.Update(); OptionsMenu.Update(); if (OptionsMenu.IsActive) { return; } if (PauseMenu.IsActive) { return; } Dialog.Update(); Overlay.Update(); KeyPopUp.Update(); Player player = GameWorld.GetPlayers()[0]; Session.Update(); //Update the game based on what GameState it is switch (CurrentGameState) { case GameState.MainMenu: MainMenu.Update(); if (GameWorld.TileArray != null && GameWorld.TileArray.Length != 0) { goto case GameState.GameWorld; } break; case GameState.LoadingScreen: LoadingScreen.Update(); if (!IsLoadingContent) { CurrentGameState = _desiredGameState; } break; case GameState.GameWorld: if (IsLoadingContent) { return; } if (GameWorld.IsOnDebug) { break; } GameWorld.TotalUpdateTimer.Start(); if (!TimeFreeze.IsTimeFrozen()) { GameWorld.UpdateWorld(); } GameWorld.UpdateVisual(); GameWorld.TotalUpdateTimer.Measure(); if (StoryTracker.IsInStoryMode) { StoryTracker.Update(); } break; } base.Update(gameTime); }
private static void Save1_MouseClicked(Button button) { ActiveSave = 1; StoryTracker.Profile = DataFolder.GetPlayerProfile(ActiveSave); StoryTracker.ResumeFromSavePoint(); }