Initial Brisk Unity SDK project

This commit is contained in:
2026-04-10 22:04:51 +08:00
commit 47f9a8bafa
171 changed files with 11091 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
public sealed class BriskConfigModule
: BriskModuleBase
{
public async Task<BriskConfigCurrent> GetCurrentAsync()
{
return await ExecutePublicAsync(async context =>
{
var data = await context.HttpClient.GetDataAsync("/config/current", CreateQuery(context), false);
return BriskModelMapper.ToConfigCurrent(data);
});
}
public Task<BriskConfigCurrent> RefreshAsync()
{
return GetCurrentAsync();
}
private static Dictionary<string, string> CreateQuery(BriskContext context)
{
return new Dictionary<string, string>
{
{ "game_key", context.Options.GameKey },
{ "client_version", context.Options.ClientVersion }
};
}
}