保存独立KV用户服务、固定会话存档与原业务接线,以及C3d资料缓存和C3e本人统计写。 保留原PF/AGG路线、业务公式和时序;榜单读取、好友资料、公告、匹配及首场景闸仍待完成。 验证:ServiceHost两条件各33组646断言;Unity CLI Loop编译0错误269警告。 包含相关方案、评审裁决、测试及状态文档。未操作服务器、正式账号或打包。
55 lines
1.8 KiB
C#
55 lines
1.8 KiB
C#
using asap.core;
|
|
using game;
|
|
using GameCore;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class SettingNotificationsGradePopupPanel : MonoBehaviour
|
|
{
|
|
public Button btn_ok;
|
|
public Button btn_cancel;
|
|
ISettingService settings;
|
|
ILocalNotificationService notifications;
|
|
bool handling;
|
|
bool completed;
|
|
private void Start()
|
|
{
|
|
settings = GContext.container.Resolve<ISettingService>();
|
|
notifications = GContext.container.Resolve<ILocalNotificationService>();
|
|
btn_ok.onClick.AddListener(OnBtnOk);
|
|
btn_cancel.onClick.AddListener(DestroyUI);
|
|
}
|
|
private void OnBtnOk()
|
|
{
|
|
HandlePrompt(true);
|
|
}
|
|
void DestroyUI()
|
|
{
|
|
HandlePrompt(false);
|
|
}
|
|
async void HandlePrompt(bool openSettings)
|
|
{
|
|
if (this == null || handling || completed) return;
|
|
handling = true;
|
|
try
|
|
{
|
|
(settings as DefaultSettingService)?.RequirePromptOwner();
|
|
(notifications as LocalNotificationService)?.RequirePromptOwner(settings);
|
|
settings.ShowNotice = true;
|
|
if (openSettings && settings is DefaultSettingService bound && bound.HasKVPromptOwner)
|
|
{
|
|
await ((LocalNotificationService)notifications).OpenSettingsAsync();
|
|
if (this == null) return;
|
|
bound.RequirePromptOwner();
|
|
}
|
|
(settings as DefaultSettingService)?.RequirePromptOwner();
|
|
completed = true;
|
|
UIManager.Instance.DestroyUI(gameObject.name);
|
|
if (openSettings && !(settings is DefaultSettingService kv && kv.HasKVPromptOwner))
|
|
notifications.OpenSettings();
|
|
}
|
|
catch (System.Exception ex) { game.DefaultSettingService.LogPromptFailure(ex); }
|
|
finally { handling = false; }
|
|
}
|
|
}
|