| | |
| | | /// </summary> |
| | | /// <param name="name">窗口名称</param> |
| | | /// <param name="functionId">功能ID,用于指定窗口的具体功能或显示模式</param> |
| | | public void Add(string name, bool isNeedHomeWin = true, int functionId = 0) |
| | | public void Add(string name, bool isNeedHomeWin = true, string battleFieldName = "", int functionId = 0) |
| | | { |
| | | var popupWindow = new PopupWindow() |
| | | { |
| | | window = name, |
| | | isNeedHomeWin = isNeedHomeWin, |
| | | battleFieldName = battleFieldName, |
| | | functionId = functionId, |
| | | }; |
| | | |
| | |
| | | if (Time.realtimeSinceStartup - firstTime < stayTime) |
| | | return; |
| | | |
| | | // 只在“没有战斗”和“主线战斗”时允许弹窗 |
| | | // 只在“没有战斗”和“主线战斗”和“自己的战场”时允许弹窗 |
| | | string activeBattleName = BattleManager.Instance.GetActiveBattleName(); |
| | | if (activeBattleName != "" && activeBattleName != "StoryBattleField") |
| | | if (activeBattleName != "" && activeBattleName != "StoryBattleField" && activeBattleName != popupWindowQueue[0].battleFieldName) |
| | | return; |
| | | |
| | | if (UIManager.Instance.IsOpened(popupWindowQueue[0].window)) |
| | |
| | | public int functionId; |
| | | |
| | | public bool isNeedHomeWin; |
| | | public string battleFieldName; |
| | | } |
| | | |
| | | } |