From 012aeb3aa0b3c9fa9be7c4bf59003fb1f0f99edc Mon Sep 17 00:00:00 2001 From: chen Date: Wed, 29 Jul 2026 22:40:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E4=BB=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .editorconfig | 4 ++ .gitattributes | 2 + .gitignore | 3 + README.md | 162 ++++++++++++++++++++++++++++++++++++++++++++++++ icon.svg | 1 + icon.svg.import | 43 +++++++++++++ project.godot | 32 ++++++++++ 7 files changed, 247 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 README.md create mode 100644 icon.svg create mode 100644 icon.svg.import create mode 100644 project.godot diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f28239b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +charset = utf-8 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0af181c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Godot 4+ specific ignores +.godot/ +/android/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..3c94a61 --- /dev/null +++ b/README.md @@ -0,0 +1,162 @@ +# 模拟宗门 — 项目目录结构 + +## 结构总览 + +``` +模拟宗门/ +│ +├── Doc/ # 设计文档 +│ ├── 修仙宗门设计文档.md +│ ├── 宗门行政体系.md +│ ├── 宗门礼仪建筑.md +│ └── 游戏模块总览.md +│ +├── addons/ # Godot 插件 +│ +├── assets/ # 原始资源文件(导入前素材) +│ ├── sprites/ # 精灵图 +│ │ ├── buildings/ +│ │ ├── characters/ +│ │ ├── icons/ +│ │ └── ui/ +│ ├── audio/ # 音频 +│ │ ├── bgm/ +│ │ └── sfx/ +│ └── fonts/ # 字体 +│ +├── resources/ # Godot 资源文件 (.tres / .res) +│ ├── settings/ # 全局配置 +│ ├── buildings/ # 建筑配置表 +│ ├── characters/ # 角色模板 +│ ├── skills/ # 功法/技能数据 +│ ├── items/ # 物品/装备数据 +│ └── events/ # 事件配置 +│ +├── src/ # 源码 + 场景(按功能模块组织) +│ │ # (.tscn 和 .cs 放在一起) +│ │ +│ ├── Core/ # 核心框架 +│ │ ├── GameManager.cs # 游戏主循环 +│ │ ├── GameManager.tscn +│ │ ├── TimeSystem.cs # 时间系统 +│ │ ├── EventBus.cs # 事件总线 +│ │ ├── SaveSystem.cs # 存档/读档 +│ │ └── ConfigLoader.cs # 配置加载 +│ │ +│ ├── Data/ # 数据层 +│ │ ├── Models/ # 数据模型(DTO) +│ │ └── SO/ # ScriptableObject 定义 +│ │ ├── BuildingSO.cs +│ │ ├── SkillSO.cs +│ │ ├── DiscipleSO.cs +│ │ └── EventSO.cs +│ │ +│ ├── Sect/ # 宗门管理 +│ │ ├── SectManager.cs # 宗门主管理器 +│ │ ├── PowerSystem.cs # 权力结构 +│ │ ├── FinanceManager.cs # 财政经济 +│ │ ├── DiplomacySystem.cs # 外交 +│ │ ├── ContributionSystem.cs # 贡献系统 +│ │ ├── buildings/ # 建筑系统 +│ │ │ ├── BuildingSystem.cs +│ │ │ ├── BuildingBase.cs +│ │ │ ├── BuildingBase.tscn +│ │ │ └── buildings/ # 具体建筑(按分类子目录) +│ │ │ ├── admin/ # 行政类 +│ │ │ ├── education/ # 教育类 +│ │ │ ├── workshop/ # 工坊类 +│ │ │ ├── storage/ # 物资类 +│ │ │ ├── resource/ # 资源类 +│ │ │ ├── living/ # 生活类 +│ │ │ ├── ritual/ # 礼仪类 +│ │ │ └── utility/ # 功能类 +│ │ ├── halls/ # 各堂管理 +│ │ │ ├── MissionHall.cs # 功德堂/任务堂 +│ │ │ ├── TeachHall.cs # 传功堂 +│ │ │ ├── LawHall.cs # 执法堂 +│ │ │ └── ForeignHall.cs # 外事堂 +│ │ └── panels/ # 宗门管理面板场景 +│ │ +│ ├── Character/ # 角色系统 +│ │ ├── Disciple.cs # 弟子类 +│ │ ├── Disciple.tscn # 弟子预制场景 +│ │ ├── DiscipleGenerator.cs # 弟子生成器 +│ │ ├── DisciplePool.cs # 弟子对象池 +│ │ ├── Stats.cs # 属性系统 +│ │ ├── CultivationSystem.cs # 境界/突破 +│ │ ├── SkillSystem.cs # 功法/技能 +│ │ ├── EquipmentSystem.cs # 装备系统 +│ │ ├── RelationshipSystem.cs # 社交关系 +│ │ └── AI/ # 弟子AI +│ │ ├── DiscipleAI.cs +│ │ └── BehaviorNodes.cs +│ │ +│ ├── Production/ # 生产制造 +│ │ ├── AlchemySystem.cs # 炼丹 +│ │ ├── ForgeSystem.cs # 炼器 +│ │ ├── TalismanSystem.cs # 符箓 +│ │ ├── ArraySystem.cs # 阵法 +│ │ ├── PuppetSystem.cs # 傀儡 +│ │ ├── FarmingSystem.cs # 种植 +│ │ └── BeastSystem.cs # 养殖 +│ │ +│ ├── Combat/ # 战斗系统 +│ │ ├── BattleManager.cs # 战斗管理器 +│ │ ├── BattleField.cs # 战场 +│ │ ├── BattleField.tscn +│ │ ├── TurnController.cs # 回合控制 +│ │ ├── DamageCalculator.cs # 伤害计算 +│ │ ├── SkillEffect.cs # 技能效果 +│ │ ├── TeamFormation.cs # 阵型 +│ │ └── enemies/ # 敌方配置 +│ │ +│ ├── World/ # 世界/地图 +│ │ ├── MapManager.cs # 地图管理器 +│ │ ├── WorldMap.cs # 大地图 +│ │ ├── WorldMap.tscn +│ │ ├── SectSite.cs # 宗门驻地 +│ │ ├── SectSite.tscn +│ │ ├── ExplorationSystem.cs # 探索系统 +│ │ ├── SecretRealm.cs # 秘境 +│ │ └── MarketSystem.cs # 市场/交易 +│ │ +│ ├── Events/ # 事件/叙事 +│ │ ├── EventManager.cs # 事件管理器 +│ │ ├── RandomEvent.cs # 随机事件 +│ │ ├── StorySystem.cs # 主线/支线 +│ │ ├── TribulationSystem.cs # 天劫系统 +│ │ └── SeasonEvent.cs # 赛季活动 +│ │ +│ ├── UI/ # 用户界面 +│ │ ├── HUD/ # 主界面 HUD +│ │ ├── Panels/ # 功能面板 +│ │ │ ├── SectPanel.cs # 宗门总览 +│ │ │ ├── DisciplePanel.cs # 弟子列表/详情 +│ │ │ ├── BuildingPanel.cs # 建筑详情 +│ │ │ ├── FinancePanel.cs # 财政面板 +│ │ │ └── EventDialog.cs # 事件弹窗 +│ │ ├── Controls/ # 自定义控件 +│ │ └── Common/ # 通用UI组件 +│ │ +│ └── Utils/ # 工具类 +│ ├── MathUtils.cs +│ ├── RandomUtils.cs +│ ├── StringUtils.cs +│ └── Extensions.cs +│ +├── icon.svg +└── project.godot +``` + +## 命名规范 + +| 类别 | 格式 | 示例 | +| -------- | ------------------ | ----------------------- | +| C# 类 | PascalCase | `SectManager.cs` | +| 场景文件 | PascalCase | `BuildingBase.tscn` | +| 资源文件 | snake_case | `iron_sword.tres` | +| 精灵图 | snake_case | `building_office.png` | +| 变量 | camelCase | `currentGold` | +| 私有变量 | _camelCase | `_discipleList` | + +> **注意**:C# 脚本的 `namespace` 使用 `项目名.模块名`,例如 `SectSim.Sect`、`SectSim.Character`。在 Godot 4 中,脚本路径决定了自动生成的默认命名空间,保持路径与命名空间一致可避免手动配置。 diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..c6bbb7d --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..59219d6 --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://tcbysc0krk3y" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..3a5e40f --- /dev/null +++ b/project.godot @@ -0,0 +1,32 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="模拟宗门" +config/features=PackedStringArray("4.7", "Forward Plus") +config/icon="res://icon.svg" + +[display] + +window/stretch/mode="canvas_items" +window/stretch/aspect="expand" + +[dotnet] + +project/assembly_name="模拟宗门" + +[physics] + +3d/physics_engine="Jolt Physics" + +[rendering] + +rendering_device/driver.windows="d3d12"