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
+6
View File
@@ -0,0 +1,6 @@
<Application x:Class="MRCC.Launcher.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
</Application.Resources>
</Application>
+7
View File
@@ -0,0 +1,7 @@
using System.Windows;
namespace MRCC.Launcher;
public partial class App : Application
{
}
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net10.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<RootNamespace>MRCC.Launcher</RootNamespace>
<AssemblyName>MRCC.Launcher</AssemblyName>
<Nullable>enable</Nullable>
<LangVersion>14.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<ApplicationManifest>app.manifest</ApplicationManifest>
<StartupObject>MRCC.Launcher.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PCL-CE\PCL.Core\PCL.Core.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="metadata.json">
<LogicalName>PCL.metadata.json</LogicalName>
</EmbeddedResource>
</ItemGroup>
</Project>
+128
View File
@@ -0,0 +1,128 @@
<Window x:Class="MRCC.Launcher.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MRCC Launcher"
Height="600" Width="900"
WindowStartupLocation="CenterScreen"
Background="#0E1116"
WindowStyle="SingleBorderWindow"
ResizeMode="CanResize"
MinHeight="500" MinWidth="700">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="220"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 侧边栏 -->
<Border Grid.Column="0" Background="#161B22" BorderBrush="#2A3441" BorderThickness="0,0,1,0">
<DockPanel Margin="0,20,0,0">
<!-- Logo -->
<StackPanel DockPanel.Dock="Top" Margin="20,0,20,20">
<TextBlock Text="MRCC" FontSize="20" FontWeight="Bold" Foreground="#E83229"
FontFamily="Consolas"/>
<TextBlock Text="MineRedCircuitcraft" FontSize="10" Foreground="#6B7280"
Margin="0,2,0,0"/>
</StackPanel>
<!-- 导航菜单 -->
<StackPanel DockPanel.Dock="Top" Margin="10,0">
<RadioButton x:Name="NavHome" Content="首页" IsChecked="True"
Style="{StaticResource NavRadioButtonStyle}"
Checked="OnNavChecked" Tag="home"/>
<RadioButton Content="下载"
Style="{StaticResource NavRadioButtonStyle}"
Checked="OnNavChecked" Tag="download"/>
<RadioButton Content="设置"
Style="{StaticResource NavRadioButtonStyle}"
Checked="OnNavChecked" Tag="settings"/>
<RadioButton Content="关于"
Style="{StaticResource NavRadioButtonStyle}"
Checked="OnNavChecked" Tag="about"/>
</StackPanel>
<!-- 底部版本信息 -->
<TextBlock DockPanel.Dock="Bottom" Text="v1.0.0-dev" Foreground="#4B5563"
FontSize="10" Margin="20,0,20,10" VerticalAlignment="Bottom"/>
</DockPanel>
</Border>
<!-- 主内容区 -->
<Grid Grid.Column="1">
<!-- 首页 -->
<StackPanel x:Name="PageHome" Margin="32,28" Visibility="Visible">
<TextBlock Text="欢迎来到 MRCC" FontSize="24" FontWeight="Bold" Foreground="#E8EAED"/>
<TextBlock Text="红石逻辑 x 像素方块 x 模拟电路" FontSize="13" Foreground="#6B7280"
Margin="0,6,0,24"/>
<Border Background="#161B22" CornerRadius="8" Padding="20" Margin="0,0,0,12">
<StackPanel>
<TextBlock Text="开始游戏" FontSize="14" FontWeight="Bold" Foreground="#E8EAED"/>
<TextBlock Text="点击下方按钮启动 MRCC 客户端" FontSize="11" Foreground="#6B7280"
Margin="0,4,0,12"/>
<Button Content="启动游戏" Width="120" Height="36" HorizontalAlignment="Left"
Background="#E83229" Foreground="White" BorderThickness="0"
FontSize="13" FontWeight="Bold" Click="OnLaunchGame"/>
</StackPanel>
</Border>
<Border Background="#161B22" CornerRadius="8" Padding="20" Margin="0,0,0,12">
<StackPanel>
<TextBlock Text="最新动态" FontSize="14" FontWeight="Bold" Foreground="#E8EAED"/>
<TextBlock Text="项目初始化中..." FontSize="11" Foreground="#6B7280" Margin="0,4,0,0"/>
</StackPanel>
</Border>
</StackPanel>
<!-- 下载页 -->
<StackPanel x:Name="PageDownload" Margin="32,28" Visibility="Collapsed">
<TextBlock Text="下载管理" FontSize="24" FontWeight="Bold" Foreground="#E8EAED"/>
<TextBlock Text="暂无下载任务" FontSize="13" Foreground="#6B7280" Margin="0,12,0,0"/>
</StackPanel>
<!-- 设置页 -->
<StackPanel x:Name="PageSettings" Margin="32,28" Visibility="Collapsed">
<TextBlock Text="设置" FontSize="24" FontWeight="Bold" Foreground="#E8EAED"/>
<TextBlock Text="设置项开发中..." FontSize="13" Foreground="#6B7280" Margin="0,12,0,0"/>
</StackPanel>
<!-- 关于页 -->
<StackPanel x:Name="PageAbout" Margin="32,28" Visibility="Collapsed">
<TextBlock Text="关于 MRCC" FontSize="24" FontWeight="Bold" Foreground="#E8EAED"/>
<TextBlock Text="MineRedCircuitcraft - 我的世界红石衍生版" FontSize="13" Foreground="#6B7280"
Margin="0,6,0,20"/>
<TextBlock Text="电路仿真游戏,红石逻辑 x 像素方块 x 模拟电路" FontSize="12" Foreground="#9BA3AE"/>
<TextBlock Text="核心库: PCL.Core (Apache 2.0)" FontSize="11" Foreground="#4B5563"
Margin="0,12,0,0"/>
</StackPanel>
</Grid>
</Grid>
<Window.Resources>
<Style x:Key="NavRadioButtonStyle" TargetType="RadioButton">
<Setter Property="Foreground" Value="#6B7280"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Padding" Value="16,10"/>
<Setter Property="Margin" Value="0,2"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Border x:Name="bd" Background="Transparent" CornerRadius="6" Padding="{TemplateBinding Padding}">
<ContentPresenter VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bd" Property="Background" Value="#1C2230"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="bd" Property="Background" Value="#1C2230"/>
<Setter Property="Foreground" Value="#E83229"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
</Window>
+29
View File
@@ -0,0 +1,29 @@
using System.Windows;
using System.Windows.Controls;
namespace MRCC.Launcher;
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void OnNavChecked(object sender, RoutedEventArgs e)
{
if (sender is not RadioButton rb) return;
var tag = rb.Tag?.ToString() ?? "home";
PageHome.Visibility = tag == "home" ? Visibility.Visible : Visibility.Collapsed;
PageDownload.Visibility = tag == "download" ? Visibility.Visible : Visibility.Collapsed;
PageSettings.Visibility = tag == "settings" ? Visibility.Visible : Visibility.Collapsed;
PageAbout.Visibility = tag == "about" ? Visibility.Visible : Visibility.Collapsed;
}
private void OnLaunchGame(object sender, RoutedEventArgs e)
{
// TODO: 启动 MRCC Unity 客户端
MessageBox.Show("游戏启动功能开发中", "MRCC Launcher", MessageBoxButton.OK, MessageBoxImage.Information);
}
}
+26
View File
@@ -0,0 +1,26 @@
using System;
using System.Windows;
using PCL.Core.App.Essentials;
using PCL.Core.App.IoC;
namespace MRCC.Launcher;
public static class Program
{
[STAThread]
public static void Main(string[] args)
{
// 设置 WPF Application 加载委托
ApplicationService.Loading = () =>
{
var app = new App();
return app;
};
// 设置主窗口加载委托
MainWindowService.Loading = () => new MainWindow();
// 启动生命周期
Lifecycle.OnInitialize();
}
}
@@ -0,0 +1,29 @@
using CommunityToolkit.Mvvm.ComponentModel;
namespace MRCC.Launcher.ViewModels;
/// <summary>
/// 主窗口 ViewModel,管理导航状态与页面数据。
/// </summary>
public partial class MainViewModel : ObservableObject
{
[ObservableProperty]
private string _versionText = "v1.0.0-dev";
[ObservableProperty]
private string _statusText = "就绪";
[ObservableProperty]
private bool _isGameInstalled;
[ObservableProperty]
private int _downloadProgress;
/// <summary>
/// 启动游戏命令(后续实现具体逻辑)
/// </summary>
public void LaunchGame()
{
// TODO: 检查游戏安装状态 -> 启动 Unity 客户端
}
}
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MRCC.Launcher"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
</application>
</compatibility>
</assembly>
+17
View File
@@ -0,0 +1,17 @@
{
"name": "MRCC Launcher",
"version": {
"base": "1.0.0",
"upstream": "",
"suffix": "dev",
"code": 1
},
"licenses": [
{
"name": "PCL.Core",
"info": "PCL Community 启动器核心库",
"website": "https://github.com/PCL-Community/PCL-CE",
"license": "https://www.apache.org/licenses/LICENSE-2.0"
}
]
}