public void PlayUISound(UIHandle handle) { switch (handle) { case UIHandle.DialogueSpeechBubblePop: AkSoundEngine.PostEvent("dialogue_a_speech_bubble_pop", gameObject); break; case UIHandle.DialogueIconPop: AkSoundEngine.PostEvent("dialogue_b_icon_pop", gameObject); break; case UIHandle.QuestInitiated: AkSoundEngine.PostEvent("quest_initiated", gameObject); break; case UIHandle.QuestFinishedNegativeRep: AkSoundEngine.PostEvent("quest_finished_negative_rep", gameObject); break; case UIHandle.QuestFinishedPositiveRep: AkSoundEngine.PostEvent("quest_finished_positive_rep", gameObject); break; case UIHandle.WorldTransition: AkSoundEngine.PostEvent("world_transition", gameObject); break; default: LogError(handle); return; } }
void AddPanel() { var panel = UI.NewMainPanel("Symbol Explorer", new SymbolExplorer()); panel.Closed += OnClosed; this.explorerPanel = new UIHandle<IMainPanel>( UI.AddMainPanel(panel, new PanelLocation(PanelSide.Right)), panel); }
void menuItem_CheckChanged(object obj) { if (((IMenuItem)obj).IsChecked) { this.AddPanel(); } else if (this.explorerPanel.Instance.IsOpen) { UI.RemoveMainPanel(this.explorerPanel.Handle); this.explorerPanel = new UIHandle<IMainPanel>(); } }
void OnClosed(object obj) { this.explorerPanel = default(UIHandle<IMainPanel>); }