FIRST
CI / Go Backend (push) Canceled after 0s

This commit is contained in:
xyou
2026-08-07 23:39:47 +08:00
parent f2105bf14c
commit 9500c4c80a
52 changed files with 3801 additions and 0 deletions
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Audio
{
/// <summary>音频管理器,统一管理 BGM、UI 音效与游戏内音效播放。</summary>
public class AudioManager : MonoBehaviour
{
}
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Audio
{
/// <summary>音符播放器,驱动音符盒与蜂鸣器,支持频率随信号强度变化。</summary>
public class NotePlayer : MonoBehaviour
{
}
}
@@ -0,0 +1,10 @@
{
"name": "RedCircuit.Audio",
"rootNamespace": "RedCircuit.Audio",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"autoReferenced": true,
"defineConstraints": []
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Auth
{
/// <summary>认证管理器,处理注册、登录、Token 刷新与会话管理。</summary>
public class AuthManager : MonoBehaviour
{
}
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Auth
{
/// <summary>OAuth 客户端,支持 Google / GitHub / Discord 第三方快捷登录。</summary>
public class OAuthClient : MonoBehaviour
{
}
}
@@ -0,0 +1,10 @@
{
"name": "RedCircuit.Auth",
"rootNamespace": "RedCircuit.Auth",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"autoReferenced": true,
"defineConstraints": []
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Auth
{
/// <summary>Token 存储,安全保存 Access Token 与 Refresh Token,支持自动刷新。</summary>
public class TokenStore : MonoBehaviour
{
}
}
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
namespace RedCircuit.Components
{
/// <summary>元件数据定义,描述元件类型、朝向、可调属性与通电状态。</summary>
[Serializable]
public class ComponentData
{
public string id;
public string type;
public int x;
public int y;
public int rotation;
public Dictionary<string, int> properties = new();
public bool isPowered;
}
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Components
{
/// <summary>元件注册表,管理 80 种元件的数据定义与图标映射。</summary>
public class ComponentRegistry : MonoBehaviour
{
}
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Components
{
/// <summary>放置控制器,处理元件拖放放置、删除、旋转操作。</summary>
public class PlacementController : MonoBehaviour
{
}
}
@@ -0,0 +1,10 @@
{
"name": "RedCircuit.Components",
"rootNamespace": "RedCircuit.Components",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"autoReferenced": true,
"defineConstraints": []
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Grid
{
/// <summary>分块管理器,将画布按 16x16 分 Chunk,仅实例化视口内 Chunk。</summary>
public class ChunkManager : MonoBehaviour
{
}
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Grid
{
/// <summary>网格画布渲染器,负责 PCB 风格网格绘制与视口裁剪。</summary>
public class GridCanvas : MonoBehaviour
{
}
}
@@ -0,0 +1,10 @@
{
"name": "RedCircuit.Grid",
"rootNamespace": "RedCircuit.Grid",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"autoReferenced": true,
"defineConstraints": []
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Grid
{
/// <summary>瓦片渲染器,负责单个元件方块的 GPU Instancing 批量绘制。</summary>
public class TileRenderer : MonoBehaviour
{
}
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Net
{
/// <summary>REST API 客户端,封装用户认证、商店、蓝图等 HTTP 请求。</summary>
public class ApiClient : MonoBehaviour
{
}
}
@@ -0,0 +1,10 @@
{
"name": "RedCircuit.Net",
"rootNamespace": "RedCircuit.Net",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"autoReferenced": true,
"defineConstraints": []
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Net
{
/// <summary>同步管理器,处理多人协作模式下的电路增量 Delta 同步与冲突解决。</summary>
public class SyncManager : MonoBehaviour
{
}
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Net
{
/// <summary>WebSocket 客户端,维持与 relay-server 的长连接,处理实时消息收发。</summary>
public class WsClient : MonoBehaviour
{
}
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Save
{
/// <summary>云端同步,将本地存档与蓝图同步至服务端,支持冲突合并。</summary>
public class CloudSync : MonoBehaviour
{
}
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Save
{
/// <summary>本地数据库,基于 SQLite 存储存档、蓝图与设置,支持离线缓存。</summary>
public class LocalDatabase : MonoBehaviour
{
}
}
@@ -0,0 +1,10 @@
{
"name": "RedCircuit.Save",
"rootNamespace": "RedCircuit.Save",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"autoReferenced": true,
"defineConstraints": []
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Save
{
/// <summary>存档管理器,管理电路存档的创建、保存、加载与删除。</summary>
public class SaveManager : MonoBehaviour
{
}
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Simulation
{
/// <summary>元件行为基类,定义元件接收信号后的规则接口。</summary>
public abstract class ComponentBehavior : MonoBehaviour
{
}
}
@@ -0,0 +1,10 @@
{
"name": "RedCircuit.Simulation",
"rootNamespace": "RedCircuit.Simulation",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"autoReferenced": true,
"defineConstraints": []
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Simulation
{
/// <summary>信号传播器,基于优先级队列 BFS 实现红石信号强度衰减传播。</summary>
public class SignalPropagator : MonoBehaviour
{
}
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.Simulation
{
/// <summary>仿真主循环,每 Tick 执行信号收集、BFS 传播、元件规则、延迟处理、输出更新。</summary>
public class SimulationLoop : MonoBehaviour
{
}
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.UI
{
/// <summary>编辑器主窗口,管理画布、工具栏、面板的整体布局与生命周期。</summary>
public class EditorWindow : MonoBehaviour
{
}
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.UI
{
/// <summary>属性面板,显示并编辑选中元件的可调属性(延迟、阻值、模式等)。</summary>
public class InspectorPanel : MonoBehaviour
{
}
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.UI
{
/// <summary>元件面板,按 8 大分类展示 80 种元件供玩家选择放置。</summary>
public class PalettePanel : MonoBehaviour
{
}
}
@@ -0,0 +1,10 @@
{
"name": "RedCircuit.UI",
"rootNamespace": "RedCircuit.UI",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"autoReferenced": true,
"defineConstraints": []
}
@@ -0,0 +1,9 @@
using UnityEngine;
namespace RedCircuit.UI
{
/// <summary>工具栏控制器,管理保存/加载/运行/暂停按钮与模式切换。</summary>
public class ToolbarController : MonoBehaviour
{
}
}
+33
View File
@@ -0,0 +1,33 @@
{
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.2d.tilemap": "1.0.0",
"com.unity.ide.visualstudio": "2.0.22",
"com.unity.ide.rider": "3.0.28",
"com.unity.test-framework": "1.1.33",
"com.unity.ugui": "2.0.0",
"com.unity.ui": "2.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0",
"com.unity.modules.physics": "1.0.0",
"com.unity.modules.physics2d": "1.0.0",
"com.unity.modules.screencapture": "1.0.0",
"com.unity.modules.terrain": "1.0.0",
"com.unity.modules.terrainphysics": "1.0.0",
"com.unity.modules.tilemap": "1.0.0",
"com.unity.modules.ui": "1.0.0",
"com.unity.modules.uielements": "1.0.0",
"com.unity.modules.umbra": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
"com.unity.modules.unitywebrequesttexture": "1.0.0",
"com.unity.modules.unitywebrequestwww": "1.0.0"
}
}
@@ -0,0 +1,2 @@
m_EditorVersion: 2024.2.0f1
m_EditorVersionWithRevision: 2024.2.0f1 (0000000000000)