feat: 项目初始化 + 3D方块世界原型 + AI助搭系统
CI / Go Backend (push) Canceled after 0s

初始化 monorepo: Go后端(7微服务) + Unity客户端(9模块) + 启动器

HTML5原型: Three.js 3D体素世界, Perlin噪声地形, 原版材质, 22种方块

Minecraft创造模式背包: 双栏布局, 拖拽移动物品, 方向性元件引脚

AI助搭策划文档 + 客户端/服务端骨架 + Docker Compose + CI
This commit is contained in:
xyou
2026-08-08 14:07:56 +08:00
parent 9500c4c80a
commit f70b061d1a
1972 changed files with 159760 additions and 6 deletions
@@ -0,0 +1,39 @@
using System;
using System.Collections.Concurrent;
using LiteDB;
using PCL.Core.App.IoC;
namespace PCL.Core.App.Database;
[LifecycleService(LifecycleState.Loading)]
public class DatabaseService() : GeneralService("database", "数据库管理")
{
private static readonly ConcurrentDictionary<string, LiteDatabase> _Instances = new();
/// <inheritdoc />
public override void Stop()
{
foreach (var instance in _Instances.Values)
{
instance.Dispose();
}
_Instances.Clear();
}
/// <summary>
/// Get the database connenction from specified connection path.<br/>
/// If not exists, a new connection will be created and cached.
/// </summary>
/// <returns>Getted connenction instance.</returns>
/// <exception cref="ArgumentException">Throw if connection path is invalid.</exception>
public static LiteDatabase GetConnection(string connectionPath)
{
if (string.IsNullOrWhiteSpace(connectionPath))
{
throw new ArgumentException("Connection string canot be null or whitespace.", nameof(connectionPath));
}
return _Instances.GetOrAdd(connectionPath, cp => new LiteDatabase(cp));
}
}