コード例 #1
0
 /// <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);
 }
コード例 #2
0
ファイル: MyScreen.cs プロジェクト: kawzar/SushiJam
    public void Show()
    {
        foreach (Graphic g in graphics)
        {
            g.enabled = true;
        }

        Showed?.Invoke();
    }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: Group.cs プロジェクト: KurbanismailovZaur/EMS
        public void ShowContext()
        {
            if (_isShowed)
            {
                return;
            }

            _isShowed = true;

            SetContextParameters(1f, true);
            Showed?.Invoke(this);
        }
コード例 #5
0
 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)));
     });
 }
コード例 #6
0
 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);
     });
 }
コード例 #7
0
        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();
            }
        }
コード例 #8
0
        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);
            }
        }
コード例 #9
0
        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);
                }
            }
        }
コード例 #10
0
 public void Show()
 {
     canvas.enabled = true;
     OnShow();
     Showed?.Invoke(this);
 }
コード例 #11
0
 public void Show()
 {
     Showed?.Invoke();
 }
コード例 #12
0
 static void Form_Showed(object sender, EventArgs e)
 {
     Showed?.Invoke((Form)sender);
 }
コード例 #13
0
 protected virtual void OnShowed(GameObjectUI arg1)
 {
     Showed?.Invoke(arg1, EventArgs.Empty);
 }
コード例 #14
0
 protected override void OnBattleUnLoad()
 {
     base.OnBattleUnLoad();
     Showed.Clear();
 }