private void PresentLine(DialogueText text) { UpdateAdvanceLockout(); SpeakerName.Text = text.SpeakerName; SpeakerText.Text = text.SpeakerText; if (text.BGMOverride != null) { _maestro.ChangeTunes(text.BGMOverride); } if (text.OneShotClip != null) { _maestro.PlaySoundEffect(text.OneShotClip, 1.0f); } if (!string.IsNullOrEmpty(text.ConversationEvent)) { if (DebugMode) { Debug.Log("Sending message " + text.ConversationEvent + " to own scripts..."); } gameObject.SendMessage(text.ConversationEvent, SendMessageOptions.RequireReceiver); } if (!string.IsNullOrEmpty(text.ConversationGift)) { _ambassador.GainItem(text.ConversationGift); } if (text.AltersProgression) { _ambassador.UpdateThread( text.QuestThreadName, text.ResultingQuestThreadPhase, text.ThreadQuestTitle, text.ThreadQuestDetails ); gameObject.SendMessage("RefreshQuestDetails", SendMessageOptions.DontRequireReceiver); } if (text.CausesSelfDestruct) { if (DebugMode) { Debug.Log("Destroying current object, reverting flags, and re-acquiring list of text sources."); } Destroy(_currentThread.CallingGameObject); DialogueAvailable = false; GUIShowing = false; _textProviders = (EntityText[])FindObjectsOfType(typeof(EntityText)); } }
private void Victory() { _maestro.ChangeTunes(VictoryTheme); _victory.SetVisibility(true); }