/// <summary> /// 开始一段旁白 /// isPause=暂停 /// isUnPauseOnEndTalk=对话结束后取消暂停 /// </summary> /// <param name="id"></param> public virtual NarrationFragment Start(string id) { CurData = TDLuaMgr.Get <TData>(id); if (CurData == null) { CLog.Error($"没有找到这个Plot:{id}"); return(null); } //如果剧情只显示一次,则返回 if (CurData.IsShowOnce && Showed.Contains(id)) { return(null); } CurNarrationIndex = 0; if (IsHave()) { Showed.Add(id); var ret = CurData.Fragments[CurNarrationIndex]; Callback_OnStartNarration?.Invoke(CurData, ret); Callback_OnChangeNarration?.Invoke(CurData); IsStartNarration = true; if (!PauseFlag) { BattleMgr.LockBattleStartFlow(true); PlotMgr?.SetPlotPause(true); } PauseFlag = true; return(ret); } return(null); }
public void Show() { foreach (Graphic g in graphics) { g.enabled = true; } Showed?.Invoke(); }
public void PushTo(Layer RenderGroup) { if (IsShowed) { throw new Exception("This object is already showed"); } RenderGroup.RenderGroup.Add(this); IsShowed = true; Showed?.Invoke(this, null); }
public void ShowContext() { if (_isShowed) { return; } _isShowed = true; SetContextParameters(1f, true); Showed?.Invoke(this); }
public void ShowWindow() { if (Settings.SettingsHolder.ForceSoftwareRendering) { RenderOptions.ProcessRenderMode = RenderMode.Default; } Dispatcher.Invoke(() => { Topmost = false; Topmost = true; Opacity = 0; Show(); Showed?.Invoke(); BeginAnimation(OpacityProperty, new DoubleAnimation(0, 1, TimeSpan.FromMilliseconds(200))); }); }
public virtual void ShowWindow() { if (App.Settings.ForceSoftwareRendering) { RenderOptions.ProcessRenderMode = RenderMode.Default; } Dispatcher?.InvokeAsync(() => { BeginAnimation(OpacityProperty, null); Opacity = 0; Show(); Showed?.Invoke(); RefreshTopmost(); BeginAnimation(OpacityProperty, _showAnim); }); }
public override void Update(GameTime gameTime) { base.Update(gameTime); for (var i = 0; i < _uiElements.Count; i++) { _uiElements[i].Update(gameTime); } _currentModalElement?.Update(gameTime); if (_waitForShowed && _uiElements.All(e => e.State == UiState.Active)) { _waitForShowed = false; Showed?.Invoke(); } if (_waitForHidden && _uiElements.All(e => e.State == UiState.Inactive)) { _waitForHidden = false; Hidden?.Invoke(); } }
async void ContextMenu_Action(string action) { bool remove = action == "Remove"; if (action == "Open Containing Folder") { if (File.Exists(_path)) { Showed?.Invoke(Path.GetDirectoryName(_path)); } else { remove |= await ShouldRemove(); } } if (remove) { Removed?.Invoke(this, _path); } }
async void ContextMenu_Click(object sender, EventArgs e) { Window root = (Window)this.GetVisualRoot(); root.Focus(); IInteractive item = ((RoutedEventArgs)e).Source; if (item is MenuItem selected) { bool remove = (string)selected.Header == "Remove"; if ((string)selected.Header == "Open Containing Folder") { if (File.Exists(_path)) { Showed?.Invoke(Path.GetDirectoryName(_path)); } else { remove |= await MessageWindow.Create( $"An error occurred while locating the file.\n\n" + "You may not have sufficient privileges to read from the destination folder, or\n" + "the file you're attempting to locate has been moved.\n\n" + "Would you like to remove it from the Recent Projects list?", new string[] { "Yes", "No" }, root ) == "Yes"; } } if (remove) { Removed?.Invoke(this, _path); } } }
public void Show() { canvas.enabled = true; OnShow(); Showed?.Invoke(this); }
public void Show() { Showed?.Invoke(); }
static void Form_Showed(object sender, EventArgs e) { Showed?.Invoke((Form)sender); }
protected virtual void OnShowed(GameObjectUI arg1) { Showed?.Invoke(arg1, EventArgs.Empty); }
protected override void OnBattleUnLoad() { base.OnBattleUnLoad(); Showed.Clear(); }