多轮审查和修复

This commit is contained in:
2026-05-12 15:34:08 +08:00
parent f55d2a57c3
commit ebbbb7332e
805 changed files with 838724 additions and 1905 deletions

View File

@@ -0,0 +1,54 @@
using System.Threading.Tasks;
namespace BaseGames.Platform
{
/// <summary>
/// 平台服务抽象接口(架构 16_SupportingModules §3
/// 解耦游戏逻辑与平台 SDKSteam / Console / Mobile
/// </summary>
public interface IPlatformService
{
// ── 初始化 / 生命周期 ──────────────────────────────────────────────────
bool IsInitialized { get; }
Task<bool> InitializeAsync();
/// <summary>每帧调用(由 PlatformBootstrap.Update 驱动),处理 SDK 回调。</summary>
void RunCallbacks();
void Shutdown();
// ── 成就 ──────────────────────────────────────────────────────────────
void UnlockAchievement(string achievementId);
void ClearAchievement(string achievementId);
Task<bool> IsAchievementUnlocked(string achievementId);
// ── 统计数据Steam 成就进度跟踪)────────────────────────────────────
void SetStat(string statId, int value);
void IncrementStat(string statId, int increment = 1);
int GetStat(string statId);
// ── 云存档 ────────────────────────────────────────────────────────────
bool IsCloudAvailable { get; }
Task<bool> CloudSaveAsync(string fileName, byte[] data);
Task<byte[]> CloudLoadAsync(string fileName);
// ── Rich Presence ─────────────────────────────────────────────────────
void SetRichPresence(string key, string value);
void ClearRichPresence();
// ── 排行榜 ────────────────────────────────────────────────────────────
void SubmitLeaderboardScore(string boardId, long score);
Task<LeaderboardEntry[]> GetLeaderboardEntries(string boardId, int maxCount);
// ── DLC / 商城 ────────────────────────────────────────────────────────
bool IsDLCOwned(string dlcId);
// ── 覆盖层Steam Overlay 等)─────────────────────────────────────────
void ShowOverlay(string dialog);
}
public struct LeaderboardEntry
{
public string PlayerName;
public long Score;
public int Rank;
}
}