Compare commits
4 Commits
main
...
6a3823ad16
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a3823ad16 | |||
| 4bfe49d5b1 | |||
| 1d3f580560 | |||
| 9259865e72 |
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Skill(whaletown-developer)"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
---
|
||||
name: godot-cli-test-runner
|
||||
description: Run Godot CLI commands for this project with emphasis on headless test execution, script runs, scene runs, and export/debug operations. Use when the user asks to run Godot tests or commands (for example “Godot 跑测试”, “执行 Godot 命令”, “检查 Godot 参数”), troubleshoot CLI failures, or request reusable terminal/CI command templates.
|
||||
---
|
||||
|
||||
# Godot CLI Test Runner
|
||||
|
||||
## Overview
|
||||
Use deterministic Godot CLI workflows for Windows terminal and CI-style execution. Prefer `--headless`, explicit `--path`, and `--log-file` for reproducible diagnostics.
|
||||
|
||||
## Quick Decision
|
||||
1. Parse-only check script syntax: `--headless --path . --script <file> --check-only`.
|
||||
2. If test logic depends on autoload singletons (for example `SceneManager`, `LocationManager`, `EventSystem`), do not use direct `--script` as primary validation; use scene/project context first.
|
||||
3. For isolated script tests without autoload dependencies, run `--headless --path . --script <file>`.
|
||||
4. Export build by using `--export-release` / `--export-debug` with an existing preset.
|
||||
5. Diagnose CLI behavior by adding `--verbose` and always writing `--log-file`.
|
||||
|
||||
## Workflow
|
||||
|
||||
### 1. Resolve executable and project path
|
||||
1. Prefer `godot` from PATH.
|
||||
2. If not available, use explicit exe path (for this machine typically `D:\technology\biancheng\Godot\Godot_v4.5.1-stable_win64_console.exe` or `D:\technology\biancheng\Godot\Godot_v4.5.1-stable_win64.exe`).
|
||||
3. Run from repository root and always pass `--path .` unless intentionally targeting another project.
|
||||
|
||||
### 2. Preflight checks
|
||||
1. Confirm engine version: `godot --version`.
|
||||
2. Confirm options when needed: `godot --help`.
|
||||
3. Confirm project exists: ensure `project.godot` is present under `--path`.
|
||||
4. Read `project.godot` `[autoload]` and check whether the target test script references those singleton names.
|
||||
5. Prepare a log output path (for example `.godot/test_xxx.log`) and pass `--log-file`.
|
||||
|
||||
### 3. Execute task type
|
||||
1. Autoload-dependent validation (preferred when script references global singleton names):
|
||||
`godot --headless --path . --scene res://scenes/MainScene.tscn --quit-after 120 --log-file .godot/smoke_main.log`
|
||||
2. Scene-specific validation:
|
||||
`godot --headless --path . --scene res://scenes/Maps/square.tscn --quit-after 90 --log-file .godot/smoke_square.log`
|
||||
3. Script test (only for isolated logic or known SceneTree tests):
|
||||
`godot --headless --path . --script tests/unit/test_xxx.gd --log-file .godot/test_xxx.log`
|
||||
4. Script syntax only:
|
||||
`godot --headless --path . --script tests/unit/test_xxx.gd --check-only --log-file .godot/check_xxx.log`
|
||||
5. Export:
|
||||
`godot --headless --path . --export-release "Web" web_assets/index.html --log-file .godot/export_web_release.log`
|
||||
|
||||
### 4. Capture and report results
|
||||
1. Report exit code, key stdout/stderr lines, and failed command.
|
||||
2. For failures, include one retry variant (for example add `--verbose`, switch explicit exe path, or switch from `--script` to `--scene` context).
|
||||
3. Keep output concise and actionable.
|
||||
4. If `--script` fails with missing singleton identifiers, mark it as context mismatch first, not business regression.
|
||||
|
||||
## Command Templates
|
||||
|
||||
### Windows (explicit exe)
|
||||
```powershell
|
||||
& "D:\technology\biancheng\Godot\Godot_v4.5.1-stable_win64_console.exe" --headless --path . --log-file .godot\test_websocket_close_code.log --script tests/unit/test_websocket_close_code.gd
|
||||
```
|
||||
|
||||
### Generic (PATH)
|
||||
```powershell
|
||||
godot --headless --path . --log-file .godot/test_websocket_close_code.log --script tests/unit/test_websocket_close_code.gd
|
||||
```
|
||||
|
||||
### With extra app args
|
||||
```powershell
|
||||
godot --headless --path . --log-file .godot/test_runner.log --script tests/unit/test_runner.gd -- --case websocket --timeout 30
|
||||
```
|
||||
|
||||
## Minimal Runnable Examples
|
||||
Run from repository root (`--path .`).
|
||||
|
||||
1. Run one scene-level smoke test (autoload-safe):
|
||||
```powershell
|
||||
godot --headless --path . --scene res://scenes/MainScene.tscn --quit-after 120 --log-file .godot/smoke_main.log
|
||||
```
|
||||
|
||||
2. Run one test script (isolated logic):
|
||||
```powershell
|
||||
godot --headless --path . --script tests/unit/test_websocket_close_code.gd --log-file .godot/test_websocket_close_code.log
|
||||
```
|
||||
|
||||
3. Run one scene:
|
||||
```powershell
|
||||
godot --headless --path . --scene res://scenes/SomeScene.tscn --quit-after 90 --log-file .godot/smoke_scene.log
|
||||
```
|
||||
|
||||
4. Parse script only (syntax check):
|
||||
```powershell
|
||||
godot --headless --path . --script tests/unit/test_websocket_close_code.gd --check-only --log-file .godot/check_websocket.log
|
||||
```
|
||||
|
||||
If `godot` is not in PATH, replace `godot` with explicit exe call:
|
||||
```powershell
|
||||
& "D:\technology\biancheng\Godot\Godot_v4.5.1-stable_win64.exe" <same arguments>
|
||||
```
|
||||
|
||||
## Option Summary Reference
|
||||
Use `references/godot-cli-commands.md` for categorized option summary and quick recipes based on `godot --help` output.
|
||||
|
||||
## Guardrails
|
||||
1. Prefer non-interactive commands.
|
||||
2. Prefer `--headless` for tests and scripts.
|
||||
3. For this environment, include `--log-file` for reproducible logs and to avoid console build logging issues.
|
||||
4. Avoid assuming GUT addon exists; check `addons/gut/gut_cmdline.gd` before using GUT command.
|
||||
5. Use `--check-only` when user requests parse/syntax validation only.
|
||||
6. For long-running runs, include `--quit-after` when appropriate.
|
||||
7. Do not classify missing autoload singleton errors in `--script` mode as product regressions until scene/project-context validation is also run.
|
||||
@@ -1,4 +0,0 @@
|
||||
interface:
|
||||
display_name: "Godot CLI Test Runner"
|
||||
short_description: "Run Godot tests and command-line workflows"
|
||||
default_prompt: "Use this skill to run Godot headless tests with autoload-aware strategy, check CLI options, and execute Godot commands with reproducible --log-file diagnostics."
|
||||
@@ -1,74 +0,0 @@
|
||||
# Godot CLI Commands Summary
|
||||
|
||||
This reference summarizes the provided `godot --help` output for fast command selection.
|
||||
|
||||
## 1. Core inspection
|
||||
- Help: `godot --help`
|
||||
- Version: `godot --version`
|
||||
- Verbose logs: `godot --verbose`
|
||||
- Quiet mode: `godot --quiet`
|
||||
|
||||
## 2. Project targeting and run mode
|
||||
- Point to project directory: `godot --path .`
|
||||
- Run specific scene: `godot --path . --scene res://scenes/MainScene.tscn`
|
||||
- Headless mode: `godot --headless --path . ...`
|
||||
- Quit quickly: `godot --path . --quit`
|
||||
- Quit after N frames: `godot --path . --quit-after 120`
|
||||
|
||||
## 3. Script execution and tests
|
||||
- Run script: `godot --headless --path . --script tests/unit/test_xxx.gd`
|
||||
- Parse-only script check: `godot --headless --path . --script tests/unit/test_xxx.gd --check-only`
|
||||
- Pass custom user args to script:
|
||||
`godot --headless --path . --script tests/unit/test_runner.gd -- --case websocket`
|
||||
- Autoload-safe smoke test (preferred when test uses singleton globals):
|
||||
`godot --headless --path . --scene res://scenes/MainScene.tscn --quit-after 120 --log-file .godot/smoke_main.log`
|
||||
|
||||
## 4. Debug and diagnostics
|
||||
- Local debugger: `godot --debug --path .`
|
||||
- Remote debug: `godot --remote-debug tcp://127.0.0.1:6007 --path .`
|
||||
- Print FPS: `godot --path . --print-fps`
|
||||
- Log to file: `godot --path . --log-file logs/godot.log`
|
||||
- Disable VSync for profiling: `godot --path . --disable-vsync`
|
||||
|
||||
## 5. Display and runtime controls
|
||||
- Fullscreen: `godot --path . --fullscreen`
|
||||
- Windowed: `godot --path . --windowed`
|
||||
- Resolution: `godot --path . --resolution 1920x1080`
|
||||
- Max FPS: `godot --path . --max-fps 60`
|
||||
- Fixed FPS: `godot --path . --fixed-fps 60`
|
||||
- Time scale: `godot --path . --time-scale 0.5`
|
||||
|
||||
## 6. Export operations (editor build only)
|
||||
- Release export:
|
||||
`godot --path . --export-release "Web" build/web/index.html`
|
||||
- Debug export:
|
||||
`godot --path . --export-debug "Web" build/web/index.html`
|
||||
- Pack export:
|
||||
`godot --path . --export-pack "Web" build/web/game.pck`
|
||||
- Check preset syntax only:
|
||||
`godot --path . --export-debug "Web" --check-only`
|
||||
|
||||
## 7. Common quick recipes
|
||||
- Run a unit test script (isolated logic):
|
||||
`godot --headless --path . --script tests/unit/test_websocket_close_code.gd --log-file .godot/test_websocket_close_code.log`
|
||||
- Validate script syntax without running:
|
||||
`godot --headless --path . --script tests/unit/test_websocket_close_code.gd --check-only --log-file .godot/check_websocket.log`
|
||||
- Run game with verbose logs:
|
||||
`godot --verbose --path . --log-file .godot/main_verbose.log`
|
||||
- Run scene and auto-exit after startup checks:
|
||||
`godot --headless --path . --scene res://scenes/MainScene.tscn --quit-after 120 --log-file .godot/smoke_main.log`
|
||||
|
||||
## 8. Windows explicit executable pattern
|
||||
When `godot` is not in PATH, call the executable directly:
|
||||
|
||||
```powershell
|
||||
& "D:\technology\biancheng\Godot\Godot_v4.5.1-stable_win64.exe" --headless --path . --script tests/unit/test_websocket_close_code.gd
|
||||
```
|
||||
|
||||
## 9. Notes for AI execution
|
||||
- Prefer `--headless` for tests and scripts in terminal/CI.
|
||||
- Always include `--path .` for reproducibility.
|
||||
- Use `--check-only` for parse checks when execution is not needed.
|
||||
- If a script depends on autoload singleton names from `project.godot` (`SceneManager`, `LocationManager`, `EventSystem`, etc.), validate in scene/project context before concluding regression.
|
||||
- Prefer `--log-file` for reliable diagnostics and environment-specific logging issues.
|
||||
- Add `--verbose` when failure context is insufficient.
|
||||
@@ -1,335 +0,0 @@
|
||||
---
|
||||
name: whaletown-developer
|
||||
description: Automate WhaleTown project's standard development workflow. Use this skill when implementing features, fixing bugs, creating scenes, or any code development tasks. Guides through 7-step process - architecture analysis, implementation, comment/naming validation, testing, and Git commit generation following project conventions.
|
||||
---
|
||||
|
||||
# WhaleTown Standard Development Workflow Skill
|
||||
|
||||
This skill automates the standard development workflow for the WhaleTown project, ensuring all developers follow unified specifications and quality standards.
|
||||
|
||||
## When to Use This Skill
|
||||
|
||||
Activate this skill when:
|
||||
- Implementing new features ("实现XX功能", "添加XX系统")
|
||||
- Fixing bugs ("修复XX Bug", "解决XX问题")
|
||||
- Creating scenes ("创建XX场景", "设计XX界面")
|
||||
- Developing modules ("开发XX模块", "构建XX组件")
|
||||
- Any code development task requiring adherence to project standards
|
||||
|
||||
## Development Workflow Overview
|
||||
|
||||
```
|
||||
Step 1: Architecture Analysis (读取架构规范)
|
||||
↓
|
||||
Step 2: Implementation (按规范编码)
|
||||
↓
|
||||
Step 3: Comment Validation (注释规范检查)
|
||||
↓
|
||||
Step 4: Naming Validation (命名规范检查)
|
||||
↓
|
||||
Step 5: Test Writing (编写测试代码)
|
||||
↓
|
||||
Step 6: Test Execution (运行测试验证)
|
||||
↓
|
||||
Step 7: Git Commit (生成规范提交信息)
|
||||
```
|
||||
|
||||
## Step-by-Step Workflow
|
||||
|
||||
### Step 1: Architecture Analysis
|
||||
|
||||
Read and apply the architecture specifications before implementation.
|
||||
|
||||
**Actions:**
|
||||
1. Read `docs/02-开发规范/架构与通信规范.md`
|
||||
2. Determine file location based on feature type:
|
||||
- Core systems → `_Core/managers/` or `_Core/systems/`
|
||||
- Game scenes → `scenes/Maps/`, `scenes/Entities/`, `scenes/Components/`
|
||||
- UI components → `scenes/ui/`
|
||||
3. Identify communication method (MUST use EventSystem for cross-module communication)
|
||||
4. List dependencies (required managers and systems)
|
||||
5. Design event definitions (add to `_Core/EventNames.gd`)
|
||||
|
||||
**Layered Architecture:**
|
||||
```
|
||||
UI Layer (界面层) → scenes/ui/
|
||||
↑
|
||||
Scenes Layer (游戏层) → scenes/Maps/, scenes/Entities/
|
||||
↑
|
||||
_Core Layer (框架层) → _Core/managers/, _Core/systems/
|
||||
```
|
||||
|
||||
**Communication Principle:** "Signal Up, Call Down"
|
||||
- Parents call child methods (downward calls)
|
||||
- Children emit signals to notify parents (upward signals)
|
||||
- Cross-module communication MUST use EventSystem
|
||||
|
||||
### Step 2: Implementation
|
||||
|
||||
Implement the feature following strict project conventions.
|
||||
|
||||
**Requirements:**
|
||||
- **Type Safety**: All variables and functions MUST have type annotations
|
||||
```gdscript
|
||||
var speed: float = 200.0
|
||||
func move(delta: float) -> void:
|
||||
```
|
||||
- **Godot 4.2+ Syntax**: NO `yield()`, use `await`
|
||||
- **Node Caching**: Use `@onready` to cache node references, avoid `get_node()` in `_process()`
|
||||
- **EventSystem Communication**: Use EventSystem for cross-module messaging
|
||||
```gdscript
|
||||
EventSystem.emit_event(EventNames.PLAYER_MOVED, {"position": global_position})
|
||||
EventSystem.connect_event(EventNames.INTERACT_PRESSED, _on_interact_pressed)
|
||||
```
|
||||
- **Nearest Filter**: All Sprite2D/TileMap resources MUST use Nearest filter (no Linear filter)
|
||||
- **AutoLoad Restrictions**: Only GameManager, SceneManager, EventSystem, NetworkManager, ResponseHandler allowed as autoloads
|
||||
- **Low-level Entities**: Do NOT directly reference GameManager in Player/NPC entities, use events instead
|
||||
|
||||
### Step 3: Comment Validation
|
||||
|
||||
Ensure code comments meet project standards.
|
||||
|
||||
**Actions:**
|
||||
1. Read `docs/02-开发规范/代码注释规范.md`
|
||||
2. Verify file header comment is complete:
|
||||
```gdscript
|
||||
# ============================================================================
|
||||
# 文件名: FeatureName.gd
|
||||
# 作用: 简短描述功能
|
||||
#
|
||||
# 主要功能:
|
||||
# - 功能点1
|
||||
# - 功能点2
|
||||
#
|
||||
# 依赖: 列出依赖的管理器/系统
|
||||
# 作者: [开发者名称]
|
||||
# 创建时间: YYYY-MM-DD
|
||||
# ============================================================================
|
||||
```
|
||||
3. Verify all public functions have complete documentation:
|
||||
```gdscript
|
||||
# 函数功能描述
|
||||
#
|
||||
# 参数:
|
||||
# param_name: Type - 参数说明
|
||||
#
|
||||
# 返回值:
|
||||
# Type - 返回值说明
|
||||
#
|
||||
# 使用示例:
|
||||
# var result = function_name(param)
|
||||
func function_name(param: Type) -> ReturnType:
|
||||
```
|
||||
4. Ensure complex logic has inline comments explaining WHY, not WHAT
|
||||
|
||||
### Step 4: Naming Validation
|
||||
|
||||
Verify all naming follows project conventions.
|
||||
|
||||
**Actions:**
|
||||
1. Read `docs/02-开发规范/命名规范.md`
|
||||
2. Validate naming conventions:
|
||||
- **Class names**: PascalCase (`class_name PlayerController`)
|
||||
- **Variables/Functions**: camelCase (`var moveSpeed: float`, `func updateMovement()`)
|
||||
- **Constants**: UPPER_CASE (`const MAX_HEALTH: int = 100`)
|
||||
- **Private members**: Underscore prefix (`var _velocity: Vector2`)
|
||||
- **Scene files**: snake_case with suffix (`player_scene.tscn`, `enemy_prefab.tscn`)
|
||||
- **Script files**: PascalCase.gd (`PlayerController.gd`, `GameManager.gd`)
|
||||
|
||||
**Common Patterns:**
|
||||
```gdscript
|
||||
# ✅ Correct
|
||||
const MAX_SPEED: float = 300.0
|
||||
var currentHealth: int
|
||||
var _isInitialized: bool = false
|
||||
func getPlayerPosition() -> Vector2:
|
||||
func _calculateDamage(baseDamage: int) -> int:
|
||||
|
||||
# ❌ Incorrect
|
||||
const maxSpeed: float = 300.0 # Constants must be UPPER_CASE
|
||||
var CurrentHealth: int # Variables must be camelCase
|
||||
var is_initialized: bool = false # No snake_case for variables
|
||||
func GetPlayerPosition() -> Vector2: # Functions must be camelCase
|
||||
```
|
||||
|
||||
### Step 5: Test Writing
|
||||
|
||||
Create unit tests for the implemented functionality.
|
||||
|
||||
**Actions:**
|
||||
1. Read `docs/03-技术实现/测试指南.md`
|
||||
2. For _Core/ managers/systems, MUST create corresponding test file in `tests/unit/`
|
||||
3. Test file naming: `test_[name].gd`
|
||||
4. Test file structure:
|
||||
```gdscript
|
||||
extends GutTest
|
||||
|
||||
## [FeatureName] 单元测试
|
||||
|
||||
var feature: FeatureName
|
||||
|
||||
func before_each():
|
||||
feature = preload("res://_Core/managers/FeatureName.gd").new()
|
||||
add_child(feature)
|
||||
|
||||
func after_each():
|
||||
feature.queue_free()
|
||||
|
||||
func test_initialization():
|
||||
var result = feature.initialize()
|
||||
assert_true(result, "Feature should initialize successfully")
|
||||
|
||||
func test_core_functionality():
|
||||
# Test core functionality
|
||||
pass
|
||||
```
|
||||
|
||||
### Step 6: Test Execution
|
||||
|
||||
Run tests to ensure code quality.
|
||||
|
||||
**Actions:**
|
||||
1. Run GUT tests using Bash tool:
|
||||
```bash
|
||||
godot --headless -s addons/gut/gut_cmdline.gd -gdir=res://tests/ -ginclude_subdirs
|
||||
```
|
||||
2. Verify all tests pass
|
||||
3. If tests fail:
|
||||
- Identify the root cause
|
||||
- Fix the implementation or test
|
||||
- Re-run tests until all pass
|
||||
|
||||
### Step 7: Git Commit
|
||||
|
||||
Generate standardized Git commit message.
|
||||
|
||||
**Actions:**
|
||||
1. Read `docs/02-开发规范/Git提交规范.md`
|
||||
2. Determine commit type based on changes:
|
||||
- `feat` - New features
|
||||
- `fix` - Bug fixes
|
||||
- `docs` - Documentation updates
|
||||
- `refactor` - Code refactoring
|
||||
- `perf` - Performance optimization
|
||||
- `test` - Test additions/modifications
|
||||
- `scene` - Scene file changes
|
||||
- `ui` - UI related changes
|
||||
3. Generate commit message using Chinese colon (:):
|
||||
```
|
||||
<类型>:<简短描述>
|
||||
|
||||
[可选的详细描述]
|
||||
```
|
||||
4. Follow principles:
|
||||
- **One commit, one change** - Most important rule
|
||||
- Use imperative verbs (添加, 修复, 更新)
|
||||
- Keep description concise (< 50 characters)
|
||||
- If multiple types of changes, split into separate commits
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
# ✅ Good commits
|
||||
git commit -m "feat:实现玩家二段跳功能"
|
||||
git commit -m "fix:修复角色跳跃时的碰撞检测问题"
|
||||
git commit -m "test:添加角色控制器单元测试"
|
||||
|
||||
# ❌ Bad commits
|
||||
git commit -m "fix + feat:修复Bug并添加新功能" # Mixed types
|
||||
git commit -m "update player" # Vague, English
|
||||
```
|
||||
|
||||
## Progress Tracking
|
||||
|
||||
Use TodoWrite tool to track workflow progress:
|
||||
|
||||
```gdscript
|
||||
TodoWrite.create_todos([
|
||||
"Step 1: 架构分析 - 读取架构规范",
|
||||
"Step 2: 功能实现 - 按规范编码",
|
||||
"Step 3: 注释规范检查",
|
||||
"Step 4: 命名规范检查",
|
||||
"Step 5: 测试代码编写",
|
||||
"Step 6: 测试验证 - 运行测试",
|
||||
"Step 7: Git 提交 - 生成提交信息"
|
||||
])
|
||||
```
|
||||
|
||||
Mark each step as `completed` immediately after finishing.
|
||||
|
||||
## Quality Checklist
|
||||
|
||||
Before completing the workflow, verify:
|
||||
|
||||
- [ ] File location follows layered architecture (_Core, scenes, UI)
|
||||
- [ ] Uses EventSystem for cross-module communication
|
||||
- [ ] Event names added to EventNames.gd
|
||||
- [ ] All variables and functions have type annotations
|
||||
- [ ] Naming conventions correct (PascalCase/camelCase/UPPER_CASE)
|
||||
- [ ] File header comment complete
|
||||
- [ ] Public functions have complete documentation
|
||||
- [ ] Unit tests created and passing
|
||||
- [ ] Git commit message follows specification
|
||||
- [ ] No Godot 3.x syntax (yield → await)
|
||||
- [ ] Node references cached with @onready
|
||||
- [ ] Sprite2D/TileMap use Nearest filter
|
||||
|
||||
## Reference Documents
|
||||
|
||||
The skill automatically reads these documents at appropriate steps:
|
||||
|
||||
- Architecture: `docs/02-开发规范/架构与通信规范.md`
|
||||
- Comments: `docs/02-开发规范/代码注释规范.md`
|
||||
- Naming: `docs/02-开发规范/命名规范.md`
|
||||
- Testing: `docs/03-技术实现/测试指南.md`
|
||||
- Git: `docs/02-开发规范/Git提交规范.md`
|
||||
- Project Instructions: `claude.md` (root directory)
|
||||
|
||||
For detailed checklist reference, see `references/checklist.md` in this skill directory.
|
||||
|
||||
## Example Workflow
|
||||
|
||||
User request: "实现玩家二段跳功能"
|
||||
|
||||
1. **Architecture Analysis** ✅
|
||||
- Read architecture spec
|
||||
- Target: `scenes/Entities/Player/Player.gd`
|
||||
- Communication: Emit `PLAYER_DOUBLE_JUMPED` event
|
||||
- Dependencies: EventSystem, Input
|
||||
- Event: Add `PLAYER_DOUBLE_JUMPED` to EventNames.gd
|
||||
|
||||
2. **Implementation** ✅
|
||||
- Create double jump logic with type annotations
|
||||
- Use EventSystem.emit_event() for notifications
|
||||
- Cache references with @onready
|
||||
- Use await instead of yield
|
||||
|
||||
3. **Comment Validation** ✅
|
||||
- Add file header with feature description
|
||||
- Document double jump function parameters
|
||||
- Add inline comments for jump logic
|
||||
|
||||
4. **Naming Validation** ✅
|
||||
- Verify: `var canDoubleJump: bool` (camelCase)
|
||||
- Verify: `const MAX_DOUBLE_JUMPS: int` (UPPER_CASE)
|
||||
- Verify: `func performDoubleJump()` (camelCase)
|
||||
|
||||
5. **Test Writing** ✅
|
||||
- Create `tests/unit/test_player_double_jump.gd`
|
||||
- Test initialization, jump execution, limits
|
||||
|
||||
6. **Test Execution** ✅
|
||||
- Run: `godot --headless -s addons/gut/gut_cmdline.gd`
|
||||
- All tests pass ✅
|
||||
|
||||
7. **Git Commit** ✅
|
||||
```bash
|
||||
git add scenes/Entities/Player/Player.gd _Core/EventNames.gd tests/unit/test_player_double_jump.gd
|
||||
git commit -m "feat:实现玩家二段跳功能"
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- This skill enforces quality standards through automated validation
|
||||
- Each step builds upon the previous, ensuring comprehensive quality control
|
||||
- Skipping steps will result in incomplete or non-compliant code
|
||||
- The 7-step workflow is designed for team consistency and maintainability
|
||||
@@ -1,285 +0,0 @@
|
||||
# WhaleTown Development Quality Checklist
|
||||
|
||||
快速参考检查清单,用于验证代码是否符合项目规范。
|
||||
|
||||
## 架构检查清单
|
||||
|
||||
### 文件位置
|
||||
- [ ] 核心系统文件位于 `_Core/managers/` 或 `_Core/systems/`
|
||||
- [ ] 游戏场景文件位于 `scenes/Maps/`, `scenes/Entities/`, `scenes/Components/`
|
||||
- [ ] UI 组件文件位于 `scenes/ui/`
|
||||
- [ ] 测试文件位于 `tests/unit/` 或 `tests/integration/`
|
||||
|
||||
### 通信方式
|
||||
- [ ] 跨模块通信使用 EventSystem
|
||||
- [ ] 新增事件定义在 `_Core/EventNames.gd` 中
|
||||
- [ ] 遵循 "Signal Up, Call Down" 原则
|
||||
- [ ] 父节点调用子节点方法(向下调用)
|
||||
- [ ] 子节点发出信号通知父节点(向上信号)
|
||||
|
||||
### 依赖管理
|
||||
- [ ] 仅使用允许的自动加载:GameManager, SceneManager, EventSystem, NetworkManager, ResponseHandler
|
||||
- [ ] 底层实体(Player, NPC)不直接访问 GameManager
|
||||
- [ ] 底层实体通过事件系统与全局管理器通信
|
||||
|
||||
---
|
||||
|
||||
## 代码规范检查清单
|
||||
|
||||
### 类型安全
|
||||
- [ ] 所有变量都有类型注解:`var speed: float = 200.0`
|
||||
- [ ] 所有函数都有参数和返回值类型:`func move(delta: float) -> void:`
|
||||
- [ ] 常量都有类型注解:`const MAX_HEALTH: int = 100`
|
||||
|
||||
### Godot 4.2+ 语法
|
||||
- [ ] 使用 `await` 代替 `yield()`
|
||||
- [ ] 使用 `@onready` 缓存节点引用
|
||||
- [ ] 避免在 `_process()` 中使用 `get_node()`
|
||||
- [ ] 信号连接使用 `.connect()` 语法
|
||||
|
||||
### 资源设置
|
||||
- [ ] 所有 Sprite2D 使用 Nearest 滤镜(不使用 Linear)
|
||||
- [ ] 所有 TileMap 使用 Nearest 滤镜
|
||||
|
||||
---
|
||||
|
||||
## 命名规范检查清单
|
||||
|
||||
### 类名
|
||||
- [ ] 使用 PascalCase:`class_name PlayerController`
|
||||
- [ ] 文件名与类名一致:`PlayerController.gd`
|
||||
|
||||
### 变量
|
||||
- [ ] 公共变量使用 camelCase:`var moveSpeed: float`
|
||||
- [ ] 私有变量使用下划线前缀:`var _velocity: Vector2`
|
||||
- [ ] 布尔变量使用 is/has/can 前缀:`var isJumping: bool`
|
||||
|
||||
### 函数
|
||||
- [ ] 使用 camelCase:`func updateMovement()`
|
||||
- [ ] 获取函数使用 `get` 前缀:`func getPlayerPosition()`
|
||||
- [ ] 设置函数使用 `set` 前缀:`func setHealth(value: int)`
|
||||
- [ ] 判断函数使用 `is/has/can` 前缀:`func isAlive()`, `func canJump()`
|
||||
- [ ] 私有函数使用下划线前缀:`func _calculateDamage()`
|
||||
|
||||
### 常量
|
||||
- [ ] 使用 UPPER_CASE:`const MAX_HEALTH: int = 100`
|
||||
- [ ] 使用下划线分隔:`const JUMP_FORCE: float = -400.0`
|
||||
|
||||
### 枚举
|
||||
- [ ] 枚举类型使用 PascalCase:`enum PlayerState`
|
||||
- [ ] 枚举值使用 UPPER_CASE:`IDLE, WALKING, RUNNING`
|
||||
|
||||
### 文件命名
|
||||
- [ ] 脚本文件:PascalCase.gd (`PlayerController.gd`)
|
||||
- [ ] 场景文件:snake_case_scene.tscn (`main_scene.tscn`)
|
||||
- [ ] 预制体文件:snake_case_prefab.tscn (`player_prefab.tscn`)
|
||||
- [ ] 资源文件:snake_case (`sprite_player_idle.png`)
|
||||
|
||||
---
|
||||
|
||||
## 注释规范检查清单
|
||||
|
||||
### 文件头注释
|
||||
- [ ] 包含文件名
|
||||
- [ ] 包含作用描述
|
||||
- [ ] 列出主要功能
|
||||
- [ ] 列出依赖的管理器/系统
|
||||
- [ ] 包含作者和创建时间
|
||||
|
||||
示例:
|
||||
```gdscript
|
||||
# ============================================================================
|
||||
# 文件名: PlayerController.gd
|
||||
# 作用: 玩家角色控制器,处理玩家输入和移动逻辑
|
||||
#
|
||||
# 主要功能:
|
||||
# - 处理键盘和手柄输入
|
||||
# - 控制角色移动和跳跃
|
||||
# - 管理角色状态切换
|
||||
#
|
||||
# 依赖: EventSystem, InputManager
|
||||
# 作者: [开发者名称]
|
||||
# 创建时间: 2025-01-03
|
||||
# ============================================================================
|
||||
```
|
||||
|
||||
### 函数注释
|
||||
- [ ] 公共函数有完整注释
|
||||
- [ ] 包含功能描述
|
||||
- [ ] 列出参数说明(名称、类型、含义)
|
||||
- [ ] 说明返回值(类型、含义)
|
||||
- [ ] 提供使用示例(对于复杂函数)
|
||||
- [ ] 标注注意事项(如果有)
|
||||
|
||||
示例:
|
||||
```gdscript
|
||||
# 处理玩家输入并更新移动状态
|
||||
#
|
||||
# 参数:
|
||||
# delta: float - 帧时间间隔
|
||||
#
|
||||
# 返回值: 无
|
||||
#
|
||||
# 注意事项:
|
||||
# - 需要在 _physics_process 中调用
|
||||
# - 会自动处理重力和碰撞
|
||||
func handleMovement(delta: float) -> void:
|
||||
```
|
||||
|
||||
### 行内注释
|
||||
- [ ] 复杂逻辑有注释说明
|
||||
- [ ] 注释解释 WHY(为什么),不解释 WHAT(是什么)
|
||||
- [ ] 避免显而易见的注释
|
||||
- [ ] 使用 TODO/FIXME/NOTE 等标记
|
||||
|
||||
---
|
||||
|
||||
## 测试规范检查清单
|
||||
|
||||
### 测试文件
|
||||
- [ ] _Core/ 中的管理器/系统都有对应测试文件
|
||||
- [ ] 测试文件位于 `tests/unit/` 或 `tests/integration/`
|
||||
- [ ] 测试文件命名:`test_[name].gd`
|
||||
- [ ] 测试文件继承自 GutTest:`extends GutTest`
|
||||
|
||||
### 测试结构
|
||||
- [ ] 包含测试类注释
|
||||
- [ ] 实现 `before_each()` 进行测试前置设置
|
||||
- [ ] 实现 `after_each()` 进行测试清理
|
||||
- [ ] 测试方法命名:`test_[功能名称]()`
|
||||
|
||||
### 测试覆盖
|
||||
- [ ] 测试核心功能的正常流程
|
||||
- [ ] 测试错误处理和边界条件
|
||||
- [ ] 测试初始化和清理逻辑
|
||||
- [ ] 所有测试都能通过
|
||||
|
||||
示例:
|
||||
```gdscript
|
||||
extends GutTest
|
||||
|
||||
## PlayerController 单元测试
|
||||
|
||||
var player: PlayerController
|
||||
|
||||
func before_each():
|
||||
player = preload("res://scenes/Entities/Player/PlayerController.gd").new()
|
||||
add_child(player)
|
||||
|
||||
func after_each():
|
||||
player.queue_free()
|
||||
|
||||
func test_initialization():
|
||||
var result = player.initialize()
|
||||
assert_true(result, "Player should initialize successfully")
|
||||
|
||||
func test_movement():
|
||||
# 测试移动功能
|
||||
pass
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Git 提交规范检查清单
|
||||
|
||||
### 提交类型
|
||||
- [ ] 使用正确的提交类型:
|
||||
- `feat` - 新功能
|
||||
- `fix` - Bug 修复
|
||||
- `docs` - 文档更新
|
||||
- `refactor` - 代码重构
|
||||
- `test` - 测试相关
|
||||
- `scene` - 场景文件
|
||||
- `ui` - UI 相关
|
||||
|
||||
### 提交格式
|
||||
- [ ] 使用中文冒号(:)
|
||||
- [ ] 描述简洁明了(< 50 字符)
|
||||
- [ ] 使用动词开头(添加、修复、更新)
|
||||
- [ ] 一次提交只包含一种类型的改动
|
||||
|
||||
### 提交原则
|
||||
- [ ] 一次提交只做一件事
|
||||
- [ ] 提交的代码能够正常运行
|
||||
- [ ] 避免 fix + feat 混合提交
|
||||
- [ ] 如需多种改动,拆分成多次提交
|
||||
|
||||
示例:
|
||||
```bash
|
||||
# ✅ 正确
|
||||
git commit -m "feat:实现玩家二段跳功能"
|
||||
git commit -m "fix:修复角色跳跃时的碰撞检测问题"
|
||||
git commit -m "test:添加角色控制器单元测试"
|
||||
|
||||
# ❌ 错误
|
||||
git commit -m "fix + feat:修复Bug并添加新功能" # 混合类型
|
||||
git commit -m "update player" # 描述不清晰,使用英文
|
||||
git commit -m "fix: 修复Bug" # 使用英文冒号
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 完整工作流检查清单
|
||||
|
||||
使用此清单验证开发任务是否完整执行 7 步工作流:
|
||||
|
||||
### Step 1: 架构分析
|
||||
- [ ] 已读取 `docs/02-开发规范/架构与通信规范.md`
|
||||
- [ ] 已确定文件位置(_Core, scenes, UI)
|
||||
- [ ] 已确定通信方式(EventSystem)
|
||||
- [ ] 已列出依赖的管理器/系统
|
||||
- [ ] 已设计事件定义(如需要)
|
||||
|
||||
### Step 2: 功能实现
|
||||
- [ ] 代码遵循分层架构
|
||||
- [ ] 所有变量和函数有类型注解
|
||||
- [ ] 使用 Godot 4.2+ 语法
|
||||
- [ ] 使用 EventSystem 进行跨模块通信
|
||||
- [ ] 使用 @onready 缓存节点引用
|
||||
|
||||
### Step 3: 注释规范检查
|
||||
- [ ] 已读取 `docs/02-开发规范/代码注释规范.md`
|
||||
- [ ] 文件头注释完整
|
||||
- [ ] 公共函数有完整注释
|
||||
- [ ] 复杂逻辑有行内注释
|
||||
|
||||
### Step 4: 命名规范检查
|
||||
- [ ] 已读取 `docs/02-开发规范/命名规范.md`
|
||||
- [ ] 类名使用 PascalCase
|
||||
- [ ] 变量/函数使用 camelCase
|
||||
- [ ] 常量使用 UPPER_CASE
|
||||
- [ ] 私有成员使用下划线前缀
|
||||
|
||||
### Step 5: 测试代码编写
|
||||
- [ ] 已读取 `docs/03-技术实现/测试指南.md`
|
||||
- [ ] 创建了测试文件 `tests/unit/test_[name].gd`
|
||||
- [ ] 测试文件继承自 GutTest
|
||||
- [ ] 编写了核心功能测试
|
||||
|
||||
### Step 6: 测试验证
|
||||
- [ ] 运行了 GUT 测试命令
|
||||
- [ ] 所有测试通过
|
||||
- [ ] 如有失败,已修复并重新测试
|
||||
|
||||
### Step 7: Git 提交
|
||||
- [ ] 已读取 `docs/02-开发规范/Git提交规范.md`
|
||||
- [ ] 生成了符合规范的提交信息
|
||||
- [ ] 提交类型正确
|
||||
- [ ] 使用中文冒号
|
||||
- [ ] 遵循"一次提交只做一件事"原则
|
||||
|
||||
---
|
||||
|
||||
## 快速自检问题
|
||||
|
||||
在提交代码前,问自己以下问题:
|
||||
|
||||
1. **架构**: 文件放在正确的位置了吗?
|
||||
2. **通信**: 是否使用 EventSystem 进行跨模块通信?
|
||||
3. **类型**: 所有变量和函数都有类型注解吗?
|
||||
4. **命名**: 命名是否符合规范(PascalCase/camelCase/UPPER_CASE)?
|
||||
5. **注释**: 文件头和公共函数有完整注释吗?
|
||||
6. **测试**: 创建并运行测试了吗?所有测试都通过了吗?
|
||||
7. **提交**: Git 提交信息符合规范吗?
|
||||
|
||||
如果以上问题都能回答"是",那么代码已经符合 WhaleTown 项目的质量标准!✅
|
||||
@@ -1,312 +0,0 @@
|
||||
# WhaleTown Developer Skill 使用说明
|
||||
|
||||
## 📖 简介
|
||||
|
||||
`whaletown-developer` 是 WhaleTown 项目的标准开发工作流自动化技能,确保所有开发任务都遵循统一的项目规范和质量标准。
|
||||
|
||||
## 🎯 适用场景
|
||||
|
||||
在以下情况下使用此 skill:
|
||||
|
||||
- ✅ 实现新功能("实现玩家二段跳"、"添加存档系统")
|
||||
- ✅ 修复 Bug("修复角色碰撞问题"、"解决UI显示错误")
|
||||
- ✅ 创建场景("创建商店场景"、"设计背包界面")
|
||||
- ✅ 开发模块("开发任务系统"、"构建战斗组件")
|
||||
- ✅ 任何需要遵循项目规范的代码开发任务
|
||||
|
||||
## 🚀 调用方式
|
||||
|
||||
### 方式一:通过 Claude(推荐)
|
||||
|
||||
```
|
||||
用户:帮我实现一个 NPC
|
||||
Claude:/whaletown-developer 实现一个 NPC
|
||||
```
|
||||
|
||||
### 方式二:直接请求
|
||||
|
||||
```
|
||||
用户:使用 whaletown-developer skill 创建玩家移动系统
|
||||
```
|
||||
|
||||
## 📋 7 步工作流程
|
||||
|
||||
skill 会自动执行以下标准化流程:
|
||||
|
||||
```
|
||||
Step 1: 架构分析
|
||||
↓ 读取架构规范,确定文件位置、通信方式、依赖关系
|
||||
|
||||
Step 2: 功能实现
|
||||
↓ 按照类型安全、命名规范、EventSystem 通信等要求编码
|
||||
|
||||
Step 3: 注释规范检查
|
||||
↓ 验证文件头、函数文档、行内注释是否完整
|
||||
|
||||
Step 4: 命名规范检查
|
||||
↓ 验证 PascalCase/camelCase/UPPER_CASE 命名规范
|
||||
|
||||
Step 5: 测试代码编写
|
||||
↓ 为核心功能创建 GUT 单元测试
|
||||
|
||||
Step 6: 测试验证
|
||||
↓ 运行测试确保功能正常
|
||||
|
||||
Step 7: Git 提交
|
||||
↓ 生成符合规范的提交信息
|
||||
```
|
||||
|
||||
## 💡 使用示例
|
||||
|
||||
### 示例 1:创建玩家控制器
|
||||
|
||||
**用户输入:**
|
||||
```
|
||||
帮我创建一个玩家角色控制器
|
||||
```
|
||||
|
||||
**Skill 执行:**
|
||||
1. 分析架构 → 确定放在 `scenes/Entities/Player/PlayerController.gd`
|
||||
2. 实现功能 → 创建带类型注解的移动、跳跃逻辑
|
||||
3. 检查注释 → 添加完整的文件头和函数文档
|
||||
4. 检查命名 → 确保 `moveSpeed`、`MAX_HEALTH` 等命名正确
|
||||
5. 编写测试 → 创建 `tests/unit/test_player_controller.gd`
|
||||
6. 运行测试 → 验证功能正常
|
||||
7. 生成提交 → `feat:实现玩家角色控制器`
|
||||
|
||||
### 示例 2:修复跳跃 Bug
|
||||
|
||||
**用户输入:**
|
||||
```
|
||||
修复玩家跳跃时的碰撞检测问题
|
||||
```
|
||||
|
||||
**Skill 执行:**
|
||||
1. 分析架构 → 定位到 `scenes/Entities/Player/Player.gd`
|
||||
2. 实现修复 → 修改碰撞检测逻辑
|
||||
3. 检查注释 → 添加修复说明注释
|
||||
4. 检查命名 → 确保变量命名规范
|
||||
5. 编写测试 → 添加碰撞测试用例
|
||||
6. 运行测试 → 确认 Bug 已修复
|
||||
7. 生成提交 → `fix:修复玩家跳跃时的碰撞检测问题`
|
||||
|
||||
### 示例 3:添加事件通信
|
||||
|
||||
**用户输入:**
|
||||
```
|
||||
实现 NPC 对话系统的事件通信
|
||||
```
|
||||
|
||||
**Skill 执行:**
|
||||
1. 分析架构 → 使用 EventSystem 跨模块通信
|
||||
2. 实现功能 → 在 EventNames.gd 添加 `NPC_DIALOG_STARTED` 事件
|
||||
3. 检查注释 → 文档化事件数据格式
|
||||
4. 检查命名 → 确保事件名称符合规范
|
||||
5. 编写测试 → 测试事件发送和接收
|
||||
6. 运行测试 → 验证通信正常
|
||||
7. 生成提交 → `feat:实现NPC对话系统的事件通信`
|
||||
|
||||
## ✅ 质量保证
|
||||
|
||||
每次使用 skill 后,代码都会符合以下标准:
|
||||
|
||||
### 架构层面
|
||||
- ✅ 文件位置符合分层架构(_Core、scenes、UI)
|
||||
- ✅ 使用 EventSystem 实现跨模块通信
|
||||
- ✅ 事件名称已添加到 EventNames.gd
|
||||
- ✅ 遵循"Signal Up, Call Down"原则
|
||||
|
||||
### 代码质量
|
||||
- ✅ 所有变量和函数都有类型注解
|
||||
- ✅ 命名规范正确(PascalCase/camelCase/UPPER_CASE)
|
||||
- ✅ 使用 Godot 4.2+ 语法(await 而非 yield)
|
||||
- ✅ 节点引用使用 @onready 缓存
|
||||
|
||||
### 文档规范
|
||||
- ✅ 文件头注释完整(文件名、作用、功能、依赖)
|
||||
- ✅ 公共函数有完整文档(参数、返回值、示例)
|
||||
- ✅ 复杂逻辑有行内注释说明
|
||||
|
||||
### 测试覆盖
|
||||
- ✅ 核心功能有单元测试
|
||||
- ✅ 测试文件命名规范(test_*.gd)
|
||||
- ✅ 测试通过验证
|
||||
|
||||
### Git 规范
|
||||
- ✅ 提交信息格式正确(类型:描述)
|
||||
- ✅ 遵循"一次提交只做一件事"原则
|
||||
- ✅ 使用中文冒号和动词开头
|
||||
|
||||
## 📚 相关文档
|
||||
|
||||
Skill 会自动读取以下规范文档:
|
||||
|
||||
- `docs/02-开发规范/架构与通信规范.md` - 分层架构和 EventSystem
|
||||
- `docs/02-开发规范/代码注释规范.md` - 注释格式要求
|
||||
- `docs/02-开发规范/命名规范.md` - 命名约定
|
||||
- `docs/03-技术实现/测试指南.md` - 测试框架使用
|
||||
- `docs/02-开发规范/Git提交规范.md` - 提交信息格式
|
||||
- `CLAUDE.md` - 项目总体指导
|
||||
|
||||
## ⚙️ 配置文件
|
||||
|
||||
Skill 相关配置文件位置:
|
||||
|
||||
```
|
||||
.claude/skills/whaletown-developer/
|
||||
├── SKILL.md # Skill 定义文件
|
||||
├── 使用说明.md # 本文档
|
||||
└── references/
|
||||
└── checklist.md # 质量检查清单
|
||||
```
|
||||
|
||||
## 🔄 工作流程可视化
|
||||
|
||||
```
|
||||
用户请求
|
||||
↓
|
||||
调用 whaletown-developer skill
|
||||
↓
|
||||
[Step 1] 架构分析
|
||||
├─ 读取架构规范文档
|
||||
├─ 确定文件位置
|
||||
├─ 识别通信方式
|
||||
└─ 设计事件定义
|
||||
↓
|
||||
[Step 2] 功能实现
|
||||
├─ 遵循类型安全
|
||||
├─ 使用 EventSystem
|
||||
├─ 缓存节点引用
|
||||
└─ 使用 Godot 4.2+ 语法
|
||||
↓
|
||||
[Step 3] 注释规范检查
|
||||
├─ 验证文件头注释
|
||||
├─ 验证函数文档
|
||||
└─ 检查行内注释
|
||||
↓
|
||||
[Step 4] 命名规范检查
|
||||
├─ 类名 PascalCase
|
||||
├─ 变量/函数 camelCase
|
||||
├─ 常量 UPPER_CASE
|
||||
└─ 私有成员 _prefix
|
||||
↓
|
||||
[Step 5] 测试代码编写
|
||||
├─ 创建测试文件
|
||||
├─ 编写测试用例
|
||||
└─ 覆盖核心功能
|
||||
↓
|
||||
[Step 6] 测试验证
|
||||
├─ 运行 GUT 测试
|
||||
├─ 验证测试通过
|
||||
└─ 修复失败测试
|
||||
↓
|
||||
[Step 7] Git 提交
|
||||
├─ 确定提交类型
|
||||
├─ 生成提交信息
|
||||
└─ 遵循提交规范
|
||||
↓
|
||||
完成 ✅
|
||||
```
|
||||
|
||||
## 🎓 最佳实践
|
||||
|
||||
### 1. 明确任务描述
|
||||
```bash
|
||||
# ✅ 好的描述
|
||||
"实现玩家二段跳功能"
|
||||
"修复敌人AI路径寻找Bug"
|
||||
"创建商店购买界面"
|
||||
|
||||
# ❌ 模糊描述
|
||||
"改一下玩家"
|
||||
"修复Bug"
|
||||
"做个界面"
|
||||
```
|
||||
|
||||
### 2. 一次处理一个功能
|
||||
```bash
|
||||
# ✅ 推荐
|
||||
用户:实现玩家移动
|
||||
用户:实现玩家跳跃
|
||||
|
||||
# ❌ 不推荐
|
||||
用户:实现玩家移动、跳跃、攻击、技能系统
|
||||
```
|
||||
|
||||
### 3. 信任 Skill 流程
|
||||
- Skill 会按照 7 步流程确保质量
|
||||
- 不需要手动检查命名、注释等细节
|
||||
- 专注于功能需求和业务逻辑
|
||||
|
||||
### 4. 查看生成的提交信息
|
||||
- Skill 会在 Step 7 生成规范的提交信息
|
||||
- 可以直接使用或根据需要微调
|
||||
|
||||
## ⚠️ 注意事项
|
||||
|
||||
1. **首次使用**
|
||||
- 确保已阅读 `CLAUDE.md` 了解项目规范
|
||||
- 确认所有规范文档都已存在
|
||||
|
||||
2. **测试环境**
|
||||
- 确保 GUT 测试框架已安装(如需运行测试)
|
||||
- Godot 可执行文件在 PATH 中(Step 6 测试执行)
|
||||
|
||||
3. **中断处理**
|
||||
- 如果工作流被中断,可以继续执行剩余步骤
|
||||
- Skill 使用 TodoWrite 追踪进度
|
||||
|
||||
4. **规范更新**
|
||||
- 项目规范文档更新时,Skill 会自动读取最新版本
|
||||
- 无需手动同步
|
||||
|
||||
## 🤝 反馈与改进
|
||||
|
||||
如果遇到问题或有改进建议:
|
||||
|
||||
1. 检查是否所有规范文档都已更新
|
||||
2. 确认任务描述清晰明确
|
||||
3. 查看 Skill 执行日志定位问题
|
||||
4. 向团队报告问题或建议
|
||||
|
||||
## 📊 效果对比
|
||||
|
||||
### 不使用 Skill
|
||||
```
|
||||
开发者手动:
|
||||
1. 不确定文件放哪里 ❌
|
||||
2. 可能忘记类型注解 ❌
|
||||
3. 注释不完整 ❌
|
||||
4. 命名不一致 ❌
|
||||
5. 没有测试 ❌
|
||||
6. 提交信息格式错误 ❌
|
||||
结果:代码质量参差不齐
|
||||
```
|
||||
|
||||
### 使用 Skill
|
||||
```
|
||||
Skill 自动化:
|
||||
1. 自动确定正确位置 ✅
|
||||
2. 强制类型安全 ✅
|
||||
3. 完整注释文档 ✅
|
||||
4. 统一命名规范 ✅
|
||||
5. 自动生成测试 ✅
|
||||
6. 规范提交信息 ✅
|
||||
结果:高质量、一致性代码
|
||||
```
|
||||
|
||||
## 🎯 总结
|
||||
|
||||
whaletown-developer skill 是你的开发助手,它会:
|
||||
|
||||
- 🤖 **自动化** 7 步标准流程
|
||||
- 📏 **标准化** 代码质量
|
||||
- 🔒 **保证** 规范遵循
|
||||
- ⚡ **加速** 开发效率
|
||||
- 🧪 **确保** 测试覆盖
|
||||
|
||||
**记住:专注于功能实现,让 Skill 处理规范和质量!**
|
||||
|
||||
---
|
||||
|
||||
**开始使用:** 只需告诉 Claude "帮我实现 XXX 功能" 即可!
|
||||
3
.gitignore
vendored
@@ -56,6 +56,3 @@ coverage/
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
vendor/
|
||||
|
||||
*.uid
|
||||
*.import
|
||||
@@ -6,7 +6,6 @@
|
||||
},
|
||||
"network": {
|
||||
"api_base_url": "https://whaletownend.xinghangee.icu",
|
||||
"location_ws_url": "wss://whaletownend.xinghangee.icu/game",
|
||||
"timeout": 30,
|
||||
"retry_count": 3
|
||||
},
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
{
|
||||
"ui": {
|
||||
"login": "登录",
|
||||
"register": "注册",
|
||||
"username": "用户名",
|
||||
"password": "密码",
|
||||
"email": "邮箱",
|
||||
"confirm_password": "确认密码",
|
||||
"verification_code": "验证码",
|
||||
"send_code": "发送验证码",
|
||||
"forgot_password": "忘记密码",
|
||||
"enter_town": "进入小镇",
|
||||
"logout": "退出登录"
|
||||
"login": "登录",
|
||||
"register": "注册",
|
||||
"username": "用户名",
|
||||
"password": "密码",
|
||||
"email": "邮箱",
|
||||
"confirm_password": "确认密码",
|
||||
"verification_code": "验证码",
|
||||
"send_code": "发送验证码",
|
||||
"forgot_password": "忘记密码",
|
||||
"enter_town": "进入小镇",
|
||||
"logout": "退出登录"
|
||||
},
|
||||
"messages": {
|
||||
"login_success": "登录成功!正在进入鲸鱼镇...",
|
||||
"register_success": "注册成功!欢迎加入鲸鱼镇",
|
||||
"network_error": "网络连接失败,请检查网络连接",
|
||||
"invalid_username": "用户名只能包含字母、数字和下划线",
|
||||
"invalid_email": "请输入有效的邮箱地址",
|
||||
"password_too_short": "密码长度至少8位",
|
||||
"password_mismatch": "两次输入的密码不一致",
|
||||
"verification_code_sent": "验证码已发送到您的邮箱,请查收"
|
||||
"login_success": "登录成功!正在进入鲸鱼镇...",
|
||||
"register_success": "注册成功!欢迎加入鲸鱼镇",
|
||||
"network_error": "网络连接失败,请检查网络连接",
|
||||
"invalid_username": "用户名只能包含字母、数字和下划线",
|
||||
"invalid_email": "请输入有效的邮箱地址",
|
||||
"password_too_short": "密码长度至少8位",
|
||||
"password_mismatch": "两次输入的密码不一致",
|
||||
"verification_code_sent": "验证码已发送到您的邮箱,请查收"
|
||||
},
|
||||
"game": {
|
||||
"level": "等级",
|
||||
"coins": "金币",
|
||||
"experience": "经验",
|
||||
"energy": "体力",
|
||||
"explore": "探索小镇",
|
||||
"inventory": "背包",
|
||||
"shop": "商店",
|
||||
"friends": "好友",
|
||||
"settings": "设置"
|
||||
"level": "等级",
|
||||
"coins": "金币",
|
||||
"experience": "经验",
|
||||
"energy": "体力",
|
||||
"explore": "探索小镇",
|
||||
"inventory": "背包",
|
||||
"shop": "商店",
|
||||
"friends": "好友",
|
||||
"settings": "设置"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -155,9 +155,9 @@ WhaleTown/ # 🐋 项目根目录
|
||||
│ ├── performance/ # ⚡ 性能测试(帧率、内存优化)
|
||||
│ └── api/ # 🌐 API接口测试
|
||||
└── 🌐 web_assets/ # 🌍 Web导出资源
|
||||
├── html/ # 📄 HTML模板文件
|
||||
├── css/ # 🎨 样式文件
|
||||
└── js/ # 📜 JavaScript脚本
|
||||
├── html/ # 📄 HTML模板文件
|
||||
├── css/ # 🎨 样式文件
|
||||
└── js/ # 📜 JavaScript脚本
|
||||
```
|
||||
|
||||
### 🔧 核心架构说明
|
||||
|
||||
@@ -57,15 +57,4 @@ const GRID_SNAP_REQUESTED = "grid_snap_requested"
|
||||
# ============================================================================
|
||||
# 测试事件
|
||||
# ============================================================================
|
||||
const TEST_EVENT = "test_event"
|
||||
|
||||
# ============================================================================
|
||||
# 聊天事件
|
||||
# ============================================================================
|
||||
const CHAT_MESSAGE_SENT = "chat_message_sent"
|
||||
const CHAT_MESSAGE_RECEIVED = "chat_message_received"
|
||||
const CHAT_ERROR_OCCURRED = "chat_error_occurred"
|
||||
const CHAT_CONNECTION_STATE_CHANGED = "chat_connection_state_changed"
|
||||
const CHAT_POSITION_UPDATED = "chat_position_updated"
|
||||
const CHAT_LOGIN_SUCCESS = "chat_login_success"
|
||||
const CHAT_LOGIN_FAILED = "chat_login_failed"
|
||||
const TEST_EVENT = "test_event"
|
||||
1
_Core/EventNames.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://qn0imbklx1m0
|
||||
1
_Core/ProjectPaths.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dybcuscku7tyl
|
||||
@@ -68,9 +68,6 @@ enum LoginMode {
|
||||
|
||||
# ============ 成员变量 ============
|
||||
|
||||
# 当前用户ID(静态变量,用于BaseLevel等场景访问)
|
||||
static var current_user_id: String = ""
|
||||
|
||||
# 登录状态
|
||||
var current_login_mode: LoginMode = LoginMode.PASSWORD
|
||||
var is_processing: bool = false
|
||||
@@ -83,191 +80,19 @@ var current_email: String = ""
|
||||
# 网络请求管理
|
||||
var active_request_ids: Array = []
|
||||
|
||||
# ============ Token 管理 ============
|
||||
|
||||
# 本地存储路径常量
|
||||
const AUTH_CONFIG_PATH: String = "user://auth.cfg"
|
||||
|
||||
# Token 存储(内存中,用于快速访问)
|
||||
var _access_token: String = "" # JWT访问令牌(短期,用于API和WebSocket)
|
||||
var _refresh_token: String = "" # JWT刷新令牌(长期,用于获取新access_token)
|
||||
var _user_info: Dictionary = {} # 用户信息
|
||||
var _token_expiry: float = 0.0 # access_token过期时间(Unix时间戳)
|
||||
|
||||
# 游戏 token(废弃,保留供旧接口)
|
||||
var _game_token: String = "" # @deprecated 使用 _access_token 替代
|
||||
|
||||
# ============ 生命周期方法 ============
|
||||
|
||||
# 初始化管理器
|
||||
func _init() -> void:
|
||||
_load_auth_data()
|
||||
_connect_network_signals()
|
||||
func _init():
|
||||
print("AuthManager 初始化完成")
|
||||
|
||||
# 清理资源
|
||||
func cleanup() -> void:
|
||||
func cleanup():
|
||||
# 取消所有活动的网络请求
|
||||
for request_id in active_request_ids:
|
||||
NetworkManager.cancel_request(request_id)
|
||||
active_request_ids.clear()
|
||||
|
||||
_disconnect_network_signals()
|
||||
|
||||
# ============ Token 管理 ============
|
||||
|
||||
# 保存 Token 到内存
|
||||
#
|
||||
# 参数:
|
||||
# data: Dictionary - 登录响应数据
|
||||
#
|
||||
# 功能:
|
||||
# - 从登录响应中提取 access_token 和 refresh_token
|
||||
# - 保存到内存变量中
|
||||
# - 保存用户信息
|
||||
func _save_tokens_to_memory(data: Dictionary) -> void:
|
||||
if not data.has("data"):
|
||||
push_warning("AuthManager: 登录响应中没有 data 字段")
|
||||
return
|
||||
|
||||
var token_data: Dictionary = data.data
|
||||
_access_token = token_data.get("access_token", "")
|
||||
_refresh_token = token_data.get("refresh_token", "")
|
||||
_user_info = token_data.get("user", {})
|
||||
_token_expiry = Time.get_unix_time_from_system() + float(token_data.get("expires_in", 0))
|
||||
|
||||
# 设置当前用户ID(用于BaseLevel等场景)
|
||||
if _user_info.has("id"):
|
||||
AuthManager.current_user_id = str(_user_info.id)
|
||||
|
||||
_game_token = _access_token
|
||||
|
||||
# 保存 Token 到本地(ConfigFile)
|
||||
#
|
||||
# 参数:
|
||||
# data: Dictionary - 登录响应数据
|
||||
#
|
||||
# 功能:
|
||||
# - 将 refresh_token 和用户信息保存到 ConfigFile
|
||||
# - access_token 不保存到本地,仅保存在内存中
|
||||
func _save_tokens_to_local(data: Dictionary) -> void:
|
||||
if not data.has("data"):
|
||||
return
|
||||
|
||||
var token_data: Dictionary = data.data
|
||||
var auth_data: Dictionary = {
|
||||
"refresh_token": token_data.get("refresh_token", ""),
|
||||
"user_id": token_data.get("user", {}).get("id", ""),
|
||||
"username": token_data.get("user", {}).get("username", ""),
|
||||
"saved_at": Time.get_unix_time_from_system()
|
||||
}
|
||||
|
||||
var config: ConfigFile = ConfigFile.new()
|
||||
config.load(AUTH_CONFIG_PATH)
|
||||
config.set_value("auth", "refresh_token", auth_data["refresh_token"])
|
||||
config.set_value("auth", "user_id", auth_data["user_id"])
|
||||
config.set_value("auth", "username", auth_data["username"])
|
||||
config.set_value("auth", "saved_at", auth_data["saved_at"])
|
||||
|
||||
var error: Error = config.save(AUTH_CONFIG_PATH)
|
||||
if error != OK:
|
||||
push_error("AuthManager: 保存Token到本地失败,错误码: %d" % error)
|
||||
|
||||
# 从本地加载 Token(游戏启动时调用)
|
||||
#
|
||||
# 功能:
|
||||
# - 从 ConfigFile 加载 refresh_token 和用户信息
|
||||
# - access_token 需要通过 refresh_token 刷新获取
|
||||
func _load_auth_data() -> void:
|
||||
if not FileAccess.file_exists(AUTH_CONFIG_PATH):
|
||||
return
|
||||
|
||||
var config: ConfigFile = ConfigFile.new()
|
||||
var error: Error = config.load(AUTH_CONFIG_PATH)
|
||||
|
||||
if error != OK:
|
||||
push_error("AuthManager: 加载本地认证数据失败,错误码: %d" % error)
|
||||
return
|
||||
|
||||
_refresh_token = config.get_value("auth", "refresh_token", "")
|
||||
var user_id: String = config.get_value("auth", "user_id", "")
|
||||
var username: String = config.get_value("auth", "username", "")
|
||||
|
||||
if not _refresh_token.is_empty():
|
||||
_user_info = {
|
||||
"id": user_id,
|
||||
"username": username
|
||||
}
|
||||
else:
|
||||
push_warning("AuthManager: 本地认证数据无效(没有 refresh_token)")
|
||||
|
||||
# 清除本地认证数据(登出时调用)
|
||||
#
|
||||
# 功能:
|
||||
# - 清除内存中的 Token
|
||||
# - 删除本地 ConfigFile
|
||||
func _clear_auth_data() -> void:
|
||||
_access_token = ""
|
||||
_refresh_token = ""
|
||||
_user_info = {}
|
||||
_token_expiry = 0.0
|
||||
_game_token = ""
|
||||
|
||||
if FileAccess.file_exists(AUTH_CONFIG_PATH):
|
||||
DirAccess.remove_absolute(AUTH_CONFIG_PATH)
|
||||
|
||||
# ============ Token 访问方法 ============
|
||||
|
||||
# 设置游戏 token(建议优先使用 _save_tokens_to_memory)
|
||||
#
|
||||
# 参数:
|
||||
# token: String - 游戏认证 token
|
||||
#
|
||||
# 使用场景:
|
||||
# - 登录成功后设置 token
|
||||
# - 从服务器响应中获取 token
|
||||
func set_game_token(token: String) -> void:
|
||||
_game_token = token
|
||||
_access_token = token # 同步更新 access_token
|
||||
|
||||
# 获取游戏 token
|
||||
#
|
||||
# 返回值:
|
||||
# String - access_token(如果未设置则返回空字符串)
|
||||
#
|
||||
# 使用场景:
|
||||
# - ChatManager 连接 WebSocket 时需要 token
|
||||
# - 其他需要游戏认证的场景
|
||||
func get_game_token() -> String:
|
||||
return _access_token
|
||||
|
||||
# 获取 access token
|
||||
#
|
||||
# 返回值:
|
||||
# String - JWT访问令牌
|
||||
#
|
||||
# 使用场景:
|
||||
# - API请求认证
|
||||
# - WebSocket聊天认证
|
||||
func get_access_token() -> String:
|
||||
return _access_token
|
||||
|
||||
# 获取 refresh token
|
||||
#
|
||||
# 返回值:
|
||||
# String - JWT刷新令牌
|
||||
#
|
||||
# 使用场景:
|
||||
# - 刷新过期的 access token
|
||||
func get_refresh_token() -> String:
|
||||
return _refresh_token
|
||||
|
||||
# 获取用户信息
|
||||
#
|
||||
# 返回值:
|
||||
# Dictionary - 用户信息字典
|
||||
func get_user_info() -> Dictionary:
|
||||
return _user_info
|
||||
|
||||
# ============ 登录相关方法 ============
|
||||
|
||||
# 执行密码登录
|
||||
@@ -596,21 +421,19 @@ func validate_verification_code(code: String) -> Dictionary:
|
||||
# ============ 网络响应处理 ============
|
||||
|
||||
# 处理登录响应
|
||||
func _on_login_response(success: bool, data: Dictionary, error_info: Dictionary) -> void:
|
||||
func _on_login_response(success: bool, data: Dictionary, error_info: Dictionary):
|
||||
_reset_login_state()
|
||||
|
||||
|
||||
var result = ResponseHandler.handle_login_response(success, data, error_info)
|
||||
|
||||
|
||||
if result.should_show_toast:
|
||||
show_toast_message.emit(result.message, result.success)
|
||||
|
||||
|
||||
if result.success:
|
||||
# 保存 Token 到内存和本地
|
||||
_save_tokens_to_memory(data)
|
||||
_save_tokens_to_local(data)
|
||||
|
||||
var username: String = _user_info.get("username", "")
|
||||
|
||||
var username = ""
|
||||
if data.has("data") and data.data.has("user") and data.data.user.has("username"):
|
||||
username = data.data.user.username
|
||||
|
||||
# 延迟发送登录成功信号
|
||||
await Engine.get_main_loop().create_timer(1.0).timeout
|
||||
login_success.emit(username)
|
||||
@@ -618,21 +441,19 @@ func _on_login_response(success: bool, data: Dictionary, error_info: Dictionary)
|
||||
login_failed.emit(result.message)
|
||||
|
||||
# 处理验证码登录响应
|
||||
func _on_verification_login_response(success: bool, data: Dictionary, error_info: Dictionary) -> void:
|
||||
func _on_verification_login_response(success: bool, data: Dictionary, error_info: Dictionary):
|
||||
_reset_login_state()
|
||||
|
||||
|
||||
var result = ResponseHandler.handle_verification_code_login_response(success, data, error_info)
|
||||
|
||||
|
||||
if result.should_show_toast:
|
||||
show_toast_message.emit(result.message, result.success)
|
||||
|
||||
|
||||
if result.success:
|
||||
# 保存 Token 到内存和本地
|
||||
_save_tokens_to_memory(data)
|
||||
_save_tokens_to_local(data)
|
||||
|
||||
var username: String = _user_info.get("username", "")
|
||||
|
||||
var username = ""
|
||||
if data.has("data") and data.data.has("user") and data.data.user.has("username"):
|
||||
username = data.data.user.username
|
||||
|
||||
await Engine.get_main_loop().create_timer(1.0).timeout
|
||||
login_success.emit(username)
|
||||
else:
|
||||
@@ -678,7 +499,7 @@ func _on_send_login_code_response(success: bool, data: Dictionary, error_info: D
|
||||
func _on_forgot_password_response(success: bool, data: Dictionary, error_info: Dictionary):
|
||||
button_state_changed.emit("forgot_password_btn", false, "忘记密码")
|
||||
|
||||
var result = ResponseHandler.handle_forgot_password_response(success, data, error_info)
|
||||
var result = ResponseHandler.handle_send_login_code_response(success, data, error_info)
|
||||
|
||||
if result.should_show_toast:
|
||||
show_toast_message.emit(result.message, result.success)
|
||||
@@ -717,10 +538,10 @@ func _can_send_verification_code(email: String) -> bool:
|
||||
if not email_data.sent:
|
||||
return true
|
||||
|
||||
var current_timestamp: int = int(Time.get_unix_time_from_system())
|
||||
var sent_timestamp: int = int(email_data.get("time", 0))
|
||||
var current_time = Time.get_time_dict_from_system()
|
||||
var current_timestamp = current_time.hour * 3600 + current_time.minute * 60 + current_time.second
|
||||
|
||||
return float(current_timestamp - sent_timestamp) >= code_cooldown
|
||||
return (current_timestamp - email_data.time) >= code_cooldown
|
||||
|
||||
# 获取剩余冷却时间
|
||||
func get_remaining_cooldown_time(email: String) -> int:
|
||||
@@ -728,15 +549,15 @@ func get_remaining_cooldown_time(email: String) -> int:
|
||||
return 0
|
||||
|
||||
var email_data = verification_codes_sent[email]
|
||||
var current_timestamp: int = int(Time.get_unix_time_from_system())
|
||||
var sent_timestamp: int = int(email_data.get("time", 0))
|
||||
var remaining: int = int(code_cooldown - float(current_timestamp - sent_timestamp))
|
||||
var current_time = Time.get_time_dict_from_system()
|
||||
var current_timestamp = current_time.hour * 3600 + current_time.minute * 60 + current_time.second
|
||||
|
||||
return maxi(0, remaining)
|
||||
return int(code_cooldown - (current_timestamp - email_data.time))
|
||||
|
||||
# 记录验证码发送状态
|
||||
func _record_verification_code_sent(email: String):
|
||||
var current_timestamp: int = int(Time.get_unix_time_from_system())
|
||||
var current_time = Time.get_time_dict_from_system()
|
||||
var current_timestamp = current_time.hour * 3600 + current_time.minute * 60 + current_time.second
|
||||
|
||||
if not verification_codes_sent.has(email):
|
||||
verification_codes_sent[email] = {}
|
||||
@@ -761,32 +582,8 @@ func _has_sent_verification_code(email: String) -> bool:
|
||||
func _is_valid_identifier(identifier: String) -> bool:
|
||||
return StringUtils.is_valid_email(identifier) or _is_valid_phone(identifier)
|
||||
|
||||
# 连接/断开 NetworkManager 请求信号,用于回收 active_request_ids
|
||||
func _connect_network_signals() -> void:
|
||||
if not NetworkManager.request_completed.is_connected(_on_network_request_completed):
|
||||
NetworkManager.request_completed.connect(_on_network_request_completed)
|
||||
if not NetworkManager.request_failed.is_connected(_on_network_request_failed):
|
||||
NetworkManager.request_failed.connect(_on_network_request_failed)
|
||||
|
||||
func _disconnect_network_signals() -> void:
|
||||
if NetworkManager.request_completed.is_connected(_on_network_request_completed):
|
||||
NetworkManager.request_completed.disconnect(_on_network_request_completed)
|
||||
if NetworkManager.request_failed.is_connected(_on_network_request_failed):
|
||||
NetworkManager.request_failed.disconnect(_on_network_request_failed)
|
||||
|
||||
func _on_network_request_completed(request_id: String, _success: bool, _data: Dictionary) -> void:
|
||||
_remove_active_request_id(request_id)
|
||||
|
||||
func _on_network_request_failed(request_id: String, _error_type: String, _message: String) -> void:
|
||||
_remove_active_request_id(request_id)
|
||||
|
||||
func _remove_active_request_id(request_id: String) -> void:
|
||||
var index: int = active_request_ids.find(request_id)
|
||||
if index != -1:
|
||||
active_request_ids.remove_at(index)
|
||||
|
||||
# 验证手机号格式
|
||||
func _is_valid_phone(phone: String) -> bool:
|
||||
var regex = RegEx.new()
|
||||
regex.compile("^\\+?[1-9]\\d{1,14}$")
|
||||
return regex.search(phone) != null
|
||||
return regex.search(phone) != null
|
||||
1
_Core/managers/AuthManager.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bpdyraefv0yta
|
||||
@@ -1,753 +0,0 @@
|
||||
extends Node
|
||||
|
||||
# ============================================================================
|
||||
# ChatManager.gd - 聊天系统业务逻辑核心
|
||||
# ============================================================================
|
||||
# 管理聊天功能的核心业务逻辑
|
||||
#
|
||||
# 核心职责:
|
||||
# - 聊天消息发送/接收协调
|
||||
# - 客户端频率限制(10条/分钟)
|
||||
# - 消息历史管理(最多100条)
|
||||
# - Signal Up: 通过信号和 EventSystem 向上通知
|
||||
# - 整合 AuthManager 获取 token
|
||||
#
|
||||
# 使用方式:
|
||||
# ChatManager.connect_to_chat_server()
|
||||
# ChatManager.send_chat_message("Hello", "local")
|
||||
# ChatManager.chat_message_received.connect(_on_message_received)
|
||||
#
|
||||
# 注意事项:
|
||||
# - 作为自动加载单例,全局可访问
|
||||
# - 遵循 "Signal Up, Call Down" 架构
|
||||
# - 所有聊天事件通过 EventSystem 广播
|
||||
# ============================================================================
|
||||
|
||||
# ============================================================================
|
||||
# 信号定义 (Signal Up)
|
||||
# ============================================================================
|
||||
|
||||
# 聊天消息已发送信号
|
||||
# 参数:
|
||||
# message_id: String - 消息 ID
|
||||
# timestamp: float - 时间戳
|
||||
signal chat_message_sent(message_id: String, timestamp: float)
|
||||
|
||||
# 聊天消息已接收信号
|
||||
# 参数:
|
||||
# from_user: String - 发送者用户名
|
||||
# content: String - 消息内容
|
||||
# show_bubble: bool - 是否显示气泡
|
||||
# timestamp: float - 时间戳
|
||||
signal chat_message_received(from_user: String, content: String, show_bubble: bool, timestamp: float)
|
||||
|
||||
# 聊天错误发生信号
|
||||
# 参数:
|
||||
# error_code: String - 错误代码
|
||||
# message: String - 错误消息
|
||||
signal chat_error_occurred(error_code: String, message: String)
|
||||
|
||||
# 聊天连接状态变化信号
|
||||
# 参数:
|
||||
# state: int - 连接状态(0=DISCONNECTED, 1=CONNECTING, 2=CONNECTED, 3=RECONNECTING, 4=ERROR)
|
||||
signal chat_connection_state_changed(state: int)
|
||||
|
||||
# 位置更新成功信号
|
||||
# 参数:
|
||||
# stream: String - Stream 名称
|
||||
# topic: String - Topic 名称
|
||||
signal chat_position_updated(stream: String, topic: String)
|
||||
|
||||
# ============================================================================
|
||||
# 常量定义
|
||||
# ============================================================================
|
||||
|
||||
# WebSocket 服务器 URL(原生 WebSocket)
|
||||
const WEBSOCKET_URL: String = "wss://whaletownend.xinghangee.icu/game"
|
||||
|
||||
# 重连配置
|
||||
const RECONNECT_MAX_ATTEMPTS: int = 5
|
||||
const RECONNECT_BASE_DELAY: float = 3.0
|
||||
|
||||
# 频率限制配置
|
||||
const RATE_LIMIT_MESSAGES: int = 10
|
||||
const RATE_LIMIT_WINDOW: float = 60.0 # 秒
|
||||
|
||||
# 消息限制
|
||||
const MAX_MESSAGE_LENGTH: int = 1000
|
||||
|
||||
# 当前会话消息限制(当前游戏会话,超过后删除最旧的)
|
||||
const MAX_SESSION_MESSAGES: int = 100
|
||||
|
||||
# 历史消息分页大小(从 Zulip 后端每次加载的数量)
|
||||
const HISTORY_PAGE_SIZE: int = 100
|
||||
|
||||
# 错误消息映射
|
||||
const CHAT_ERROR_MESSAGES: Dictionary = {
|
||||
"AUTH_FAILED": "聊天认证失败,请重新登录",
|
||||
"RATE_LIMIT": "消息发送过于频繁,请稍后再试",
|
||||
"CONTENT_FILTERED": "消息内容包含违规内容",
|
||||
"CONTENT_TOO_LONG": "消息内容过长(最大1000字符)",
|
||||
"PERMISSION_DENIED": "您没有权限发送消息",
|
||||
"SESSION_EXPIRED": "会话已过期,请重新连接",
|
||||
"ZULIP_ERROR": "消息服务暂时不可用",
|
||||
"INTERNAL_ERROR": "服务器内部错误"
|
||||
}
|
||||
|
||||
# ============================================================================
|
||||
# 成员变量
|
||||
# ============================================================================
|
||||
|
||||
# WebSocket 管理器
|
||||
var _websocket_manager: ChatWebSocketManager
|
||||
|
||||
# 是否已登录
|
||||
var _is_logged_in: bool = false
|
||||
|
||||
# 消息历史记录(当前会话,最多100条,超过后删除最旧的)
|
||||
var _message_history: Array[Dictionary] = []
|
||||
|
||||
# 历史消息加载状态
|
||||
var _history_loading: bool = false
|
||||
var _has_more_history: bool = true
|
||||
var _oldest_message_timestamp: float = 0.0
|
||||
|
||||
# 消息发送时间戳(用于频率限制)
|
||||
var _message_timestamps: Array[float] = []
|
||||
|
||||
# 当前用户信息
|
||||
var _current_username: String = ""
|
||||
var _current_map: String = ""
|
||||
|
||||
# 游戏 token
|
||||
var _game_token: String = ""
|
||||
|
||||
# 发送后本地回显去重(避免服务端也回发导致重复显示)
|
||||
const SELF_ECHO_DEDUPE_WINDOW: float = 10.0
|
||||
var _pending_self_messages: Array[Dictionary] = []
|
||||
|
||||
# 空消息类型告警限频(避免日志刷屏)
|
||||
const EMPTY_MESSAGE_TYPE_WARNING_INTERVAL: float = 10.0
|
||||
var _last_empty_message_type_warning_at: float = -1000.0
|
||||
|
||||
# ============================================================================
|
||||
# 生命周期方法
|
||||
# ============================================================================
|
||||
|
||||
# 初始化
|
||||
func _ready() -> void:
|
||||
# 创建 WebSocket 管理器
|
||||
_websocket_manager = ChatWebSocketManager.new()
|
||||
add_child(_websocket_manager)
|
||||
|
||||
# 连接信号
|
||||
_connect_signals()
|
||||
|
||||
# 清理
|
||||
func _exit_tree() -> void:
|
||||
if is_instance_valid(_websocket_manager):
|
||||
_websocket_manager.queue_free()
|
||||
|
||||
# ============================================================================
|
||||
# 公共 API - Token 管理
|
||||
# ============================================================================
|
||||
|
||||
# 设置游戏 token
|
||||
#
|
||||
# 参数:
|
||||
# token: String - 游戏认证 token
|
||||
#
|
||||
# 使用示例:
|
||||
# ChatManager.set_game_token("your_game_token")
|
||||
func set_game_token(token: String) -> void:
|
||||
_game_token = token
|
||||
|
||||
# 获取游戏 token
|
||||
#
|
||||
# 返回值:
|
||||
# String - 当前游戏 token
|
||||
func get_game_token() -> String:
|
||||
return _game_token
|
||||
|
||||
# ============================================================================
|
||||
# 公共 API - 连接管理
|
||||
# ============================================================================
|
||||
|
||||
# 连接到聊天服务器
|
||||
func connect_to_chat_server() -> void:
|
||||
if _websocket_manager.is_websocket_connected():
|
||||
push_warning("聊天服务器已连接")
|
||||
return
|
||||
|
||||
_websocket_manager.connect_to_game_server()
|
||||
|
||||
# 断开聊天服务器
|
||||
func disconnect_from_chat_server() -> void:
|
||||
# 发送登出消息
|
||||
if _is_logged_in:
|
||||
var logout_data := {"type": "logout"}
|
||||
_websocket_manager.send_message(JSON.stringify(logout_data))
|
||||
_is_logged_in = false
|
||||
|
||||
# 断开连接
|
||||
_websocket_manager.disconnect_websocket()
|
||||
|
||||
# 检查是否已连接
|
||||
#
|
||||
# 返回值:
|
||||
# bool - 是否已连接
|
||||
func is_chat_connected() -> bool:
|
||||
return _websocket_manager.is_websocket_connected()
|
||||
|
||||
# ============================================================================
|
||||
# 公共 API - 聊天操作
|
||||
# ============================================================================
|
||||
|
||||
# 发送聊天消息
|
||||
#
|
||||
# 参数:
|
||||
# content: String - 消息内容
|
||||
# scope: String - 消息范围("local" 或具体 topic 名称)
|
||||
#
|
||||
# 使用示例:
|
||||
# ChatManager.send_chat_message("Hello, world!", "local")
|
||||
func send_chat_message(content: String, scope: String = "local") -> void:
|
||||
# 检查连接状态
|
||||
if not _websocket_manager.is_websocket_connected():
|
||||
_handle_error("NOT_CONNECTED", "未连接到聊天服务器")
|
||||
return
|
||||
|
||||
# 检查登录状态
|
||||
if not _is_logged_in:
|
||||
_handle_error("NOT_LOGGED_IN", "尚未登录聊天服务器")
|
||||
return
|
||||
|
||||
# 检查消息长度
|
||||
if content.length() > MAX_MESSAGE_LENGTH:
|
||||
_handle_error("CONTENT_TOO_LONG", "消息内容过长")
|
||||
return
|
||||
|
||||
# 检查频率限制
|
||||
if not can_send_message():
|
||||
var wait_time := get_time_until_next_message()
|
||||
_handle_error("RATE_LIMIT", "请等待 %.1f 秒后再试" % wait_time)
|
||||
return
|
||||
|
||||
# 构建消息数据
|
||||
var message_data := {
|
||||
"type": "chat",
|
||||
"content": content,
|
||||
"scope": scope
|
||||
}
|
||||
|
||||
# 发送消息(JSON 字符串)
|
||||
var json_string := JSON.stringify(message_data)
|
||||
var send_err: Error = _websocket_manager.send_message(json_string)
|
||||
if send_err != OK:
|
||||
_handle_error("SEND_FAILED", "WebSocket send failed: %s" % error_string(send_err))
|
||||
return
|
||||
|
||||
# 记录发送时间
|
||||
_record_message_timestamp()
|
||||
|
||||
# 添加到历史
|
||||
_add_message_to_history({
|
||||
"from_user": _current_username,
|
||||
"content": content,
|
||||
"timestamp": Time.get_unix_time_from_system(),
|
||||
"is_self": true
|
||||
})
|
||||
|
||||
var now_timestamp: float = Time.get_unix_time_from_system()
|
||||
|
||||
# 记录待去重的“自己消息”(如果服务端也回发 chat_render,则避免重复显示)
|
||||
_pending_self_messages.append({
|
||||
"content": content,
|
||||
"expires_at": now_timestamp + SELF_ECHO_DEDUPE_WINDOW
|
||||
})
|
||||
|
||||
# 本地回显:UI 目前只订阅 CHAT_MESSAGE_RECEIVED,所以这里也发一次 received
|
||||
chat_message_received.emit(_current_username, content, true, now_timestamp)
|
||||
EventSystem.emit_event(EventNames.CHAT_MESSAGE_RECEIVED, {
|
||||
"from_user": _current_username,
|
||||
"content": content,
|
||||
"show_bubble": true,
|
||||
"timestamp": now_timestamp,
|
||||
"is_self": true
|
||||
})
|
||||
|
||||
# 消息发送完成回调
|
||||
func _on_chat_message_sent(_request_id: String, success: bool, data: Dictionary, error_info: Dictionary) -> void:
|
||||
if success:
|
||||
var message_id: String = str(data.get("data", {}).get("id", ""))
|
||||
var timestamp: float = Time.get_unix_time_from_system()
|
||||
chat_message_sent.emit(message_id, timestamp)
|
||||
EventSystem.emit_event(EventNames.CHAT_MESSAGE_SENT, {
|
||||
"message_id": message_id,
|
||||
"timestamp": timestamp
|
||||
})
|
||||
else:
|
||||
_handle_error("SEND_FAILED", error_info.get("message", "发送失败"))
|
||||
|
||||
# 更新玩家位置
|
||||
#
|
||||
# 参数:
|
||||
# x: float - X 坐标
|
||||
# y: float - Y 坐标
|
||||
# map_id: String - 地图 ID
|
||||
#
|
||||
# 使用示例:
|
||||
# ChatManager.update_player_position(150.0, 200.0, "novice_village")
|
||||
func update_player_position(x: float, y: float, map_id: String) -> void:
|
||||
if not _websocket_manager.is_websocket_connected():
|
||||
return
|
||||
|
||||
var position_data := {
|
||||
"type": "position",
|
||||
"x": x,
|
||||
"y": y,
|
||||
"mapId": map_id
|
||||
}
|
||||
|
||||
# 发送消息(JSON 字符串)
|
||||
var json_string := JSON.stringify(position_data)
|
||||
_websocket_manager.send_message(json_string)
|
||||
|
||||
# ============================================================================
|
||||
# 公共 API - 频率限制
|
||||
# ============================================================================
|
||||
|
||||
# 检查是否可以发送消息
|
||||
#
|
||||
# 返回值:
|
||||
# bool - 是否可以发送
|
||||
func can_send_message() -> bool:
|
||||
var current_time := Time.get_unix_time_from_system()
|
||||
|
||||
# 清理过期的时间戳
|
||||
var filter_func := func(timestamp: float) -> bool:
|
||||
return current_time - timestamp < RATE_LIMIT_WINDOW
|
||||
_message_timestamps = _message_timestamps.filter(filter_func)
|
||||
|
||||
# 检查数量
|
||||
return _message_timestamps.size() < RATE_LIMIT_MESSAGES
|
||||
|
||||
# 获取距离下次可发送消息的时间
|
||||
#
|
||||
# 返回值:
|
||||
# float - 等待时间(秒)
|
||||
func get_time_until_next_message() -> float:
|
||||
if _message_timestamps.is_empty():
|
||||
return 0.0
|
||||
|
||||
if _message_timestamps.size() < RATE_LIMIT_MESSAGES:
|
||||
return 0.0
|
||||
|
||||
# 找到最早的时间戳
|
||||
var earliest_timestamp: float = _message_timestamps[0]
|
||||
var current_time := Time.get_unix_time_from_system()
|
||||
var elapsed := current_time - earliest_timestamp
|
||||
|
||||
if elapsed >= RATE_LIMIT_WINDOW:
|
||||
return 0.0
|
||||
|
||||
return RATE_LIMIT_WINDOW - elapsed
|
||||
|
||||
# ============================================================================
|
||||
# 公共 API - 消息历史
|
||||
# ============================================================================
|
||||
|
||||
# 获取消息历史
|
||||
#
|
||||
# 返回值:
|
||||
# Array[Dictionary] - 消息历史数组
|
||||
func get_message_history() -> Array[Dictionary]:
|
||||
return _message_history.duplicate()
|
||||
|
||||
# 清空消息历史
|
||||
func clear_message_history() -> void:
|
||||
_message_history.clear()
|
||||
|
||||
# 重置当前会话(每次登录/重连时调用)
|
||||
#
|
||||
# 功能:
|
||||
# - 清空当前会话消息缓存
|
||||
# - 重置历史消息加载状态
|
||||
# - 不影响 Zulip 后端的历史消息
|
||||
#
|
||||
# 使用场景:
|
||||
# - 用户登录成功后
|
||||
# - 重新连接到聊天服务器后
|
||||
func reset_session() -> void:
|
||||
_message_history.clear()
|
||||
_history_loading = false
|
||||
_has_more_history = true
|
||||
_oldest_message_timestamp = 0.0
|
||||
|
||||
# 加载历史消息(按需从 Zulip 后端获取)
|
||||
#
|
||||
# 参数:
|
||||
# count: int - 要加载的消息数量(默认 HISTORY_PAGE_SIZE)
|
||||
#
|
||||
# 功能:
|
||||
# - 从 Zulip 后端获取历史消息
|
||||
# - 添加到当前会话历史开头
|
||||
# - 触发 CHAT_MESSAGE_RECEIVED 事件显示消息
|
||||
#
|
||||
# 使用场景:
|
||||
# - 用户滚动到聊天窗口顶部
|
||||
# - 用户主动点击"加载历史"按钮
|
||||
#
|
||||
# 注意:
|
||||
# - 这是异步操作,需要通过 Zulip API 实现
|
||||
# - 当前实现为占位符,需要后端 API 支持
|
||||
func load_history(_count: int = HISTORY_PAGE_SIZE) -> void:
|
||||
if _history_loading:
|
||||
return
|
||||
|
||||
if not _has_more_history:
|
||||
return
|
||||
|
||||
_history_loading = true
|
||||
|
||||
# TODO: 实现从 Zulip 后端获取历史消息
|
||||
# NetworkManager.get_chat_history(_oldest_message_timestamp, count, _on_history_loaded)
|
||||
|
||||
# 历史消息加载完成回调
|
||||
func _on_history_loaded(messages: Array) -> void:
|
||||
_history_loading = false
|
||||
|
||||
if messages.is_empty():
|
||||
_has_more_history = false
|
||||
return
|
||||
|
||||
# 将历史消息插入到当前会话历史开头
|
||||
for i in range(messages.size() - 1, -1, -1):
|
||||
var message: Dictionary = messages[i]
|
||||
_message_history.push_front(message)
|
||||
|
||||
# 触发事件显示消息(Signal Up)
|
||||
EventSystem.emit_event(EventNames.CHAT_MESSAGE_RECEIVED, {
|
||||
"from_user": message.get("from_user", ""),
|
||||
"content": message.get("content", ""),
|
||||
"show_bubble": false,
|
||||
"timestamp": message.get("timestamp", 0.0),
|
||||
"is_self": (not _current_username.is_empty() and message.get("from_user", "") == _current_username),
|
||||
"is_history": true # 标记为历史消息
|
||||
})
|
||||
|
||||
# 更新最旧消息时间戳
|
||||
var oldest: Dictionary = messages.back()
|
||||
if oldest.has("timestamp"):
|
||||
_oldest_message_timestamp = oldest.timestamp
|
||||
|
||||
# 检查是否还有更多历史
|
||||
if messages.size() < HISTORY_PAGE_SIZE:
|
||||
_has_more_history = false
|
||||
|
||||
# ============================================================================
|
||||
# 内部方法 - 信号连接
|
||||
# ============================================================================
|
||||
|
||||
# 连接信号
|
||||
func _connect_signals() -> void:
|
||||
# WebSocket 管理器信号
|
||||
_websocket_manager.connection_state_changed.connect(_on_connection_state_changed)
|
||||
_websocket_manager.data_received.connect(_on_data_received)
|
||||
|
||||
# 发送登录消息
|
||||
func _send_login_message() -> void:
|
||||
var login_data := {
|
||||
"type": "login",
|
||||
"token": _game_token
|
||||
}
|
||||
|
||||
var json_string := JSON.stringify(login_data)
|
||||
_websocket_manager.send_message(json_string)
|
||||
|
||||
# 连接状态变化
|
||||
func _on_connection_state_changed(state: int) -> void:
|
||||
# 发射信号
|
||||
chat_connection_state_changed.emit(state)
|
||||
|
||||
# 通过 EventSystem 广播(Signal Up)
|
||||
EventSystem.emit_event(EventNames.CHAT_CONNECTION_STATE_CHANGED, {
|
||||
"state": state
|
||||
})
|
||||
|
||||
# 如果连接成功,发送登录消息
|
||||
if state == 2: # CONNECTED
|
||||
_send_login_message()
|
||||
|
||||
# ============================================================================
|
||||
# 内部方法 - 消息处理
|
||||
# ============================================================================
|
||||
|
||||
# WebSocket 数据接收
|
||||
func _on_data_received(message: String) -> void:
|
||||
# 解析 JSON 消息
|
||||
var json := JSON.new()
|
||||
var parse_result := json.parse(message)
|
||||
|
||||
if parse_result != OK:
|
||||
push_error("ChatManager: JSON 解析失败")
|
||||
return
|
||||
|
||||
var data_variant: Variant = json.data
|
||||
if not (data_variant is Dictionary):
|
||||
push_warning("ChatManager: 收到非对象消息,已忽略")
|
||||
return
|
||||
|
||||
var data: Dictionary = data_variant
|
||||
|
||||
# 兼容不同后端字段命名:t / type
|
||||
var message_type: String = str(data.get("t", data.get("type", ""))).strip_edges()
|
||||
if message_type.is_empty():
|
||||
_warn_empty_message_type_limited(data)
|
||||
return
|
||||
|
||||
match message_type:
|
||||
"connected":
|
||||
pass
|
||||
"login_success":
|
||||
_handle_login_success(data)
|
||||
"login_error":
|
||||
_handle_login_error(data)
|
||||
"chat":
|
||||
_handle_chat_render(data)
|
||||
"chat_sent":
|
||||
_handle_chat_sent(data)
|
||||
"chat_error":
|
||||
_handle_chat_error(data)
|
||||
"chat_render":
|
||||
_handle_chat_render(data)
|
||||
"position_updated":
|
||||
_handle_position_updated(data)
|
||||
"error":
|
||||
_handle_error_response(data)
|
||||
_:
|
||||
push_warning("ChatManager: 未处理的消息类型 %s" % message_type)
|
||||
|
||||
func _warn_empty_message_type_limited(data: Dictionary) -> void:
|
||||
var now: float = Time.get_unix_time_from_system()
|
||||
if now - _last_empty_message_type_warning_at < EMPTY_MESSAGE_TYPE_WARNING_INTERVAL:
|
||||
return
|
||||
|
||||
_last_empty_message_type_warning_at = now
|
||||
var payload_preview: String = JSON.stringify(data)
|
||||
if payload_preview.length() > 180:
|
||||
payload_preview = payload_preview.substr(0, 180) + "..."
|
||||
push_warning("ChatManager: 收到未带消息类型的消息,已忽略 payload=%s" % payload_preview)
|
||||
|
||||
# 处理登录成功
|
||||
func _handle_login_success(data: Dictionary) -> void:
|
||||
_is_logged_in = true
|
||||
_current_username = data.get("username", "")
|
||||
_current_map = data.get("currentMap", "")
|
||||
|
||||
# 重置当前会话缓存(每次登录/重连都清空,重新开始接收消息)
|
||||
reset_session()
|
||||
|
||||
# 通过 EventSystem 广播(Signal Up)
|
||||
EventSystem.emit_event(EventNames.CHAT_LOGIN_SUCCESS, {
|
||||
"username": _current_username,
|
||||
"current_map": _current_map
|
||||
})
|
||||
|
||||
# 处理登录失败
|
||||
func _handle_login_error(data: Dictionary) -> void:
|
||||
var error_message: String = data.get("message", "登录失败")
|
||||
|
||||
_is_logged_in = false
|
||||
|
||||
# 通过 EventSystem 广播错误(Signal Up)
|
||||
EventSystem.emit_event(EventNames.CHAT_LOGIN_FAILED, {
|
||||
"error_code": "LOGIN_FAILED",
|
||||
"message": error_message
|
||||
})
|
||||
|
||||
# 处理聊天消息发送成功
|
||||
func _handle_chat_sent(data: Dictionary) -> void:
|
||||
var message_id: String = str(data.get("messageId", ""))
|
||||
var timestamp: float = data.get("timestamp", 0.0)
|
||||
|
||||
# 发射信号
|
||||
chat_message_sent.emit(message_id, timestamp)
|
||||
|
||||
# 通过 EventSystem 广播(Signal Up)
|
||||
EventSystem.emit_event(EventNames.CHAT_MESSAGE_SENT, {
|
||||
"message_id": message_id,
|
||||
"timestamp": timestamp
|
||||
})
|
||||
|
||||
# 处理聊天消息发送失败
|
||||
func _handle_chat_error(data: Dictionary) -> void:
|
||||
var error_message: String = data.get("message", "消息发送失败")
|
||||
|
||||
# 通过 EventSystem 广播错误(Signal Up)
|
||||
EventSystem.emit_event(EventNames.CHAT_ERROR_OCCURRED, {
|
||||
"error_code": "CHAT_SEND_FAILED",
|
||||
"message": error_message
|
||||
})
|
||||
|
||||
# 处理接收到的聊天消息
|
||||
func _handle_chat_render(data: Dictionary) -> void:
|
||||
# 兼容不同后端字段命名:
|
||||
# - chat_render: {from, txt, bubble, timestamp}
|
||||
# - chat: {content, scope, (可选 from/username/timestamp)}
|
||||
var from_user: String = data.get("from", data.get("from_user", data.get("username", "")))
|
||||
var content: String = data.get("txt", data.get("content", ""))
|
||||
var show_bubble: bool = bool(data.get("bubble", data.get("show_bubble", false)))
|
||||
|
||||
var timestamp: float = _parse_chat_timestamp_to_unix(data.get("timestamp", 0.0))
|
||||
|
||||
var is_self: bool = (not _current_username.is_empty() and from_user == _current_username)
|
||||
if is_self and _consume_pending_self_message(content):
|
||||
# 已经本地回显过,避免重复显示
|
||||
return
|
||||
|
||||
# 如果服务端没带发送者信息,但内容匹配最近自己发送的消息,则认为是自己消息
|
||||
if from_user.is_empty() and _consume_pending_self_message(content):
|
||||
from_user = _current_username
|
||||
is_self = true
|
||||
|
||||
# 添加到历史
|
||||
_add_message_to_history({
|
||||
"from_user": from_user,
|
||||
"content": content,
|
||||
"timestamp": timestamp,
|
||||
"is_self": is_self
|
||||
})
|
||||
|
||||
# 发射信号
|
||||
chat_message_received.emit(from_user, content, show_bubble, timestamp)
|
||||
|
||||
# 通过 EventSystem 广播(Signal Up)
|
||||
EventSystem.emit_event(EventNames.CHAT_MESSAGE_RECEIVED, {
|
||||
"from_user": from_user,
|
||||
"content": content,
|
||||
"show_bubble": show_bubble,
|
||||
"timestamp": timestamp,
|
||||
"is_self": is_self
|
||||
})
|
||||
|
||||
# 解析聊天消息时间戳(兼容 unix 秒 / ISO 8601 字符串)
|
||||
func _parse_chat_timestamp_to_unix(timestamp_raw: Variant) -> float:
|
||||
if typeof(timestamp_raw) == TYPE_INT or typeof(timestamp_raw) == TYPE_FLOAT:
|
||||
var ts := float(timestamp_raw)
|
||||
return ts if ts > 0.0 else Time.get_unix_time_from_system()
|
||||
|
||||
var ts_str := str(timestamp_raw)
|
||||
if ts_str.strip_edges().is_empty():
|
||||
return Time.get_unix_time_from_system()
|
||||
|
||||
# 纯数字字符串(必须整串都是数字/小数点,避免把 ISO 字符串前缀 "2026" 误判成时间戳)
|
||||
var numeric_regex := RegEx.new()
|
||||
numeric_regex.compile("^\\s*-?\\d+(?:\\.\\d+)?\\s*$")
|
||||
if numeric_regex.search(ts_str) != null:
|
||||
var ts_num := float(ts_str)
|
||||
return ts_num if ts_num > 0.0 else Time.get_unix_time_from_system()
|
||||
|
||||
# ISO 8601: 2026-01-19T15:15:43.930Z
|
||||
var regex := RegEx.new()
|
||||
regex.compile("(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})")
|
||||
var result := regex.search(ts_str)
|
||||
if result == null:
|
||||
return Time.get_unix_time_from_system()
|
||||
|
||||
var utc_dict := {
|
||||
"year": int(result.get_string(1)),
|
||||
"month": int(result.get_string(2)),
|
||||
"day": int(result.get_string(3)),
|
||||
"hour": int(result.get_string(4)),
|
||||
"minute": int(result.get_string(5)),
|
||||
"second": int(result.get_string(6))
|
||||
}
|
||||
return Time.get_unix_time_from_datetime_dict(utc_dict)
|
||||
|
||||
# 处理位置更新成功
|
||||
func _handle_position_updated(data: Dictionary) -> void:
|
||||
var stream: String = data.get("stream", "")
|
||||
var topic: String = data.get("topic", "")
|
||||
|
||||
# 发射信号
|
||||
chat_position_updated.emit(stream, topic)
|
||||
|
||||
# 通过 EventSystem 广播(Signal Up)
|
||||
EventSystem.emit_event(EventNames.CHAT_POSITION_UPDATED, {
|
||||
"stream": stream,
|
||||
"topic": topic
|
||||
})
|
||||
|
||||
# 处理错误响应(如果需要)
|
||||
func _handle_error_response(data: Dictionary) -> void:
|
||||
var error_code: String = data.get("code", "")
|
||||
var error_message: String = data.get("message", "")
|
||||
|
||||
_handle_error(error_code, error_message)
|
||||
|
||||
# 处理 Socket 错误(如果需要)
|
||||
func _on_socket_error(error: String) -> void:
|
||||
_handle_error("SOCKET_ERROR", error)
|
||||
|
||||
# ============================================================================
|
||||
# 内部方法 - 工具函数
|
||||
# ============================================================================
|
||||
|
||||
# 处理错误
|
||||
func _handle_error(error_code: String, error_message: String) -> void:
|
||||
push_error("ChatManager: [%s] %s" % [error_code, error_message])
|
||||
|
||||
# 获取用户友好的错误消息
|
||||
var user_message: String = CHAT_ERROR_MESSAGES.get(error_code, error_message) as String
|
||||
|
||||
# 发射信号
|
||||
chat_error_occurred.emit(error_code, user_message)
|
||||
|
||||
# 通过 EventSystem 广播(Signal Up)
|
||||
EventSystem.emit_event(EventNames.CHAT_ERROR_OCCURRED, {
|
||||
"error_code": error_code,
|
||||
"message": user_message
|
||||
})
|
||||
|
||||
# 特殊处理认证失败
|
||||
if error_code == "AUTH_FAILED" or error_code == "SESSION_EXPIRED":
|
||||
_is_logged_in = false
|
||||
EventSystem.emit_event(EventNames.CHAT_LOGIN_FAILED, {
|
||||
"error_code": error_code
|
||||
})
|
||||
|
||||
# 记录消息发送时间戳
|
||||
func _record_message_timestamp() -> void:
|
||||
var current_time := Time.get_unix_time_from_system()
|
||||
_message_timestamps.append(current_time)
|
||||
|
||||
# 消费一个待去重的“自己消息”(允许相同内容多次发送:每次消费一个)
|
||||
func _consume_pending_self_message(content: String) -> bool:
|
||||
var now := Time.get_unix_time_from_system()
|
||||
|
||||
# 先清理过期项
|
||||
for i in range(_pending_self_messages.size() - 1, -1, -1):
|
||||
var item: Dictionary = _pending_self_messages[i]
|
||||
if float(item.get("expires_at", 0.0)) < now:
|
||||
_pending_self_messages.remove_at(i)
|
||||
|
||||
# 再匹配内容
|
||||
for i in range(_pending_self_messages.size() - 1, -1, -1):
|
||||
if str(_pending_self_messages[i].get("content", "")) == content:
|
||||
_pending_self_messages.remove_at(i)
|
||||
return true
|
||||
|
||||
return false
|
||||
|
||||
# 添加消息到当前会话历史
|
||||
func _add_message_to_history(message: Dictionary) -> void:
|
||||
_message_history.append(message)
|
||||
|
||||
# 更新最旧消息时间戳(用于历史消息加载)
|
||||
if _oldest_message_timestamp == 0.0 or message.timestamp < _oldest_message_timestamp:
|
||||
_oldest_message_timestamp = message.timestamp
|
||||
|
||||
# 限制当前会话消息数量(超过后删除最旧的)
|
||||
if _message_history.size() > MAX_SESSION_MESSAGES:
|
||||
_message_history.pop_front()
|
||||
@@ -57,6 +57,7 @@ var game_version: String = "1.0.0" # 游戏版本号
|
||||
# 初始化游戏管理器
|
||||
# 在节点准备就绪时调用,设置初始状态
|
||||
func _ready():
|
||||
print("GameManager 初始化完成")
|
||||
change_state(GameState.AUTH) # 启动时进入认证状态
|
||||
|
||||
# ============ 状态管理方法 ============
|
||||
@@ -80,6 +81,9 @@ func change_state(new_state: GameState):
|
||||
previous_state = current_state
|
||||
current_state = new_state
|
||||
|
||||
# 输出状态变更日志
|
||||
print("游戏状态变更: ", GameState.keys()[previous_state], " -> ", GameState.keys()[current_state])
|
||||
|
||||
# 发送状态变更信号
|
||||
game_state_changed.emit(new_state)
|
||||
|
||||
@@ -96,7 +100,7 @@ func get_current_state() -> GameState:
|
||||
# GameState - 上一个游戏状态
|
||||
#
|
||||
# 使用场景:
|
||||
# - 从暂停状态恢复时,返回到暂停前状态
|
||||
# - 从暂停状态恢复时,返回到之前的状态
|
||||
# - 错误处理时回退到安全状态
|
||||
func get_previous_state() -> GameState:
|
||||
return previous_state
|
||||
@@ -110,12 +114,14 @@ func get_previous_state() -> GameState:
|
||||
#
|
||||
# 功能:
|
||||
# - 存储当前登录用户信息
|
||||
# - 输出用户设置日志
|
||||
#
|
||||
# 注意事项:
|
||||
# - 用户登录成功后调用此方法
|
||||
# - 用户登出时应传入空字符串
|
||||
func set_current_user(username: String):
|
||||
current_user = username
|
||||
print("当前用户设置为: ", username)
|
||||
|
||||
# 获取当前登录用户
|
||||
#
|
||||
|
||||
1
_Core/managers/GameManager.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cd8fn73ysjxh8
|
||||
@@ -1,220 +0,0 @@
|
||||
extends Node
|
||||
|
||||
# ============================================================================
|
||||
# LocationManager.gd - 位置同步管理器
|
||||
# ============================================================================
|
||||
# 负责与后端 WebSocket 服务进行位置同步和多人会话管理
|
||||
#
|
||||
# 协议文档: new_docs/game_architecture_design.md
|
||||
# 后端地址默认值: wss://whaletownend.xinghangee.icu/game
|
||||
# 可通过以下方式覆盖:
|
||||
# 1) 环境变量 WHALETOWN_LOCATION_WS_URL
|
||||
# 2) Config/game_config.json 或 config/game_config.json 中的
|
||||
# network.location_ws_url / network.game_ws_url
|
||||
# ============================================================================
|
||||
|
||||
signal connected_to_server()
|
||||
signal connection_closed()
|
||||
signal connection_error()
|
||||
signal session_joined(data: Dictionary)
|
||||
signal user_joined(data: Dictionary)
|
||||
signal user_left(data: Dictionary)
|
||||
signal position_updated(data: Dictionary)
|
||||
|
||||
const DEFAULT_WS_URL: String = "wss://whaletownend.xinghangee.icu/game"
|
||||
const WS_URL_ENV_KEY: String = "WHALETOWN_LOCATION_WS_URL"
|
||||
const PING_INTERVAL = 25.0 # 秒
|
||||
|
||||
var _socket: WebSocketPeer
|
||||
var _connected: bool = false
|
||||
var _ping_timer: float = 0.0
|
||||
var _auth_token: String = ""
|
||||
var _connection_error_reported: bool = false
|
||||
var _is_connecting: bool = false
|
||||
var _ws_url: String = DEFAULT_WS_URL
|
||||
|
||||
func _ready():
|
||||
_socket = WebSocketPeer.new()
|
||||
process_mode = Node.PROCESS_MODE_ALWAYS # 保证暂停时也能处理网络
|
||||
_ws_url = _resolve_ws_url()
|
||||
|
||||
func _process(delta):
|
||||
_socket.poll()
|
||||
|
||||
var state = _socket.get_ready_state()
|
||||
|
||||
if state == WebSocketPeer.STATE_OPEN:
|
||||
_connection_error_reported = false
|
||||
_is_connecting = false
|
||||
|
||||
if not _connected:
|
||||
_on_connected()
|
||||
|
||||
# 处理接收到的数据包
|
||||
while _socket.get_available_packet_count() > 0:
|
||||
var packet = _socket.get_packet()
|
||||
_handle_packet(packet)
|
||||
|
||||
# 心跳处理
|
||||
_ping_timer += delta
|
||||
if _ping_timer >= PING_INTERVAL:
|
||||
_send_heartbeat()
|
||||
_ping_timer = 0.0
|
||||
|
||||
elif state == WebSocketPeer.STATE_CLOSED:
|
||||
if _connected:
|
||||
_on_disconnected()
|
||||
elif _is_connecting and not _connection_error_reported:
|
||||
var close_code := _socket.get_close_code()
|
||||
var close_reason := _socket.get_close_reason()
|
||||
push_warning(
|
||||
"LocationManager: WebSocket 握手失败,close_code=%d, reason=%s" % [close_code, close_reason]
|
||||
)
|
||||
connection_error.emit()
|
||||
_connection_error_reported = true
|
||||
_is_connecting = false
|
||||
|
||||
func connect_to_server():
|
||||
var state: WebSocketPeer.State = _socket.get_ready_state()
|
||||
if state == WebSocketPeer.STATE_OPEN or state == WebSocketPeer.STATE_CONNECTING:
|
||||
return
|
||||
|
||||
_connection_error_reported = false
|
||||
_is_connecting = true
|
||||
var err = _socket.connect_to_url(_ws_url)
|
||||
if err != OK:
|
||||
push_error("LocationManager: WebSocket 连接请求失败,url=%s, 错误码: %d" % [_ws_url, err])
|
||||
connection_error.emit()
|
||||
_connection_error_reported = true
|
||||
_is_connecting = false
|
||||
else:
|
||||
# Godot WebSocket connect is non-blocking, wait for state change in _process
|
||||
pass
|
||||
|
||||
func _resolve_ws_url() -> String:
|
||||
var env_url: String = OS.get_environment(WS_URL_ENV_KEY).strip_edges()
|
||||
if not env_url.is_empty():
|
||||
return env_url
|
||||
|
||||
for config_path in ["res://Config/game_config.json", "res://config/game_config.json"]:
|
||||
var config_url: String = _load_ws_url_from_config(config_path)
|
||||
if not config_url.is_empty():
|
||||
return config_url
|
||||
|
||||
return DEFAULT_WS_URL
|
||||
|
||||
func _load_ws_url_from_config(config_path: String) -> String:
|
||||
if not FileAccess.file_exists(config_path):
|
||||
return ""
|
||||
|
||||
var content: String = FileAccess.get_file_as_string(config_path)
|
||||
if content.is_empty():
|
||||
return ""
|
||||
|
||||
var json := JSON.new()
|
||||
if json.parse(content) != OK:
|
||||
push_warning("LocationManager: 读取配置失败 %s - %s" % [config_path, json.get_error_message()])
|
||||
return ""
|
||||
|
||||
var data_variant: Variant = json.data
|
||||
if not (data_variant is Dictionary):
|
||||
return ""
|
||||
|
||||
var root: Dictionary = data_variant
|
||||
var network_variant: Variant = root.get("network", {})
|
||||
if not (network_variant is Dictionary):
|
||||
return ""
|
||||
|
||||
var network_config: Dictionary = network_variant
|
||||
var ws_url: String = str(network_config.get("location_ws_url", network_config.get("game_ws_url", ""))).strip_edges()
|
||||
return ws_url
|
||||
|
||||
func close_connection():
|
||||
_socket.close()
|
||||
|
||||
func set_auth_token(token: String):
|
||||
_auth_token = token
|
||||
|
||||
# ============ 协议发送 ============
|
||||
|
||||
func send_packet(event: String, data: Dictionary):
|
||||
if _socket.get_ready_state() != WebSocketPeer.STATE_OPEN:
|
||||
return
|
||||
|
||||
var message = {
|
||||
"event": event,
|
||||
"data": data
|
||||
}
|
||||
var json_str = JSON.stringify(message)
|
||||
_socket.put_packet(json_str.to_utf8_buffer())
|
||||
|
||||
func join_session(map_id: String, initial_pos: Vector2):
|
||||
var data = {
|
||||
"sessionId": map_id,
|
||||
"initialPosition": {
|
||||
"x": initial_pos.x,
|
||||
"y": initial_pos.y,
|
||||
"mapId": map_id
|
||||
},
|
||||
"token": _auth_token
|
||||
}
|
||||
send_packet("join_session", data)
|
||||
|
||||
func leave_session(map_id: String):
|
||||
send_packet("leave_session", {"sessionId": map_id})
|
||||
|
||||
func send_position_update(map_id: String, pos: Vector2, anim_data: Dictionary = {}):
|
||||
var data = {
|
||||
"x": pos.x,
|
||||
"y": pos.y,
|
||||
"mapId": map_id,
|
||||
"metadata": anim_data
|
||||
}
|
||||
if map_id == "":
|
||||
push_warning("LocationManager: position_update 的 map_id 为空")
|
||||
send_packet("position_update", data)
|
||||
|
||||
func _send_heartbeat():
|
||||
send_packet("heartbeat", {"timestamp": Time.get_unix_time_from_system()})
|
||||
|
||||
# ============ 事件处理 ============
|
||||
|
||||
func _on_connected():
|
||||
_connected = true
|
||||
connected_to_server.emit()
|
||||
|
||||
func _on_disconnected():
|
||||
_connected = false
|
||||
connection_closed.emit()
|
||||
|
||||
func _handle_packet(packet: PackedByteArray):
|
||||
var json_str = packet.get_string_from_utf8()
|
||||
var json = JSON.new()
|
||||
var err = json.parse(json_str)
|
||||
|
||||
if err != OK:
|
||||
push_error("LocationManager: JSON 解析失败 - %s" % json.get_error_message())
|
||||
return
|
||||
|
||||
var message = json.data
|
||||
if not message is Dictionary or not message.has("event"):
|
||||
return
|
||||
|
||||
var event = message["event"]
|
||||
var data = message.get("data", {})
|
||||
|
||||
match event:
|
||||
"session_joined":
|
||||
session_joined.emit(data)
|
||||
"user_joined":
|
||||
user_joined.emit(data)
|
||||
"user_left":
|
||||
user_left.emit(data)
|
||||
"position_update":
|
||||
position_updated.emit(data)
|
||||
"heartbeat_response":
|
||||
pass # 静默处理
|
||||
"error":
|
||||
push_error("LocationManager: WebSocket 错误事件 - %s" % JSON.stringify(data))
|
||||
_:
|
||||
push_warning("LocationManager: 未处理的 WebSocket 事件 %s" % event)
|
||||
@@ -109,6 +109,13 @@ class RequestInfo:
|
||||
var active_requests: Dictionary = {} # 存储所有活动请求 {request_id: RequestInfo}
|
||||
var request_counter: int = 0 # 请求计数器,用于生成唯一ID
|
||||
|
||||
# ============ 生命周期方法 ============
|
||||
|
||||
# 初始化网络管理器
|
||||
# 在节点准备就绪时调用
|
||||
func _ready():
|
||||
print("NetworkManager 已初始化")
|
||||
|
||||
# ============ 公共API接口 ============
|
||||
|
||||
# 发送GET请求
|
||||
@@ -186,6 +193,14 @@ func delete_request(endpoint: String, callback: Callable = Callable(), timeout:
|
||||
#
|
||||
# 回调函数签名:
|
||||
# func callback(success: bool, data: Dictionary, error_info: Dictionary)
|
||||
#
|
||||
# 使用示例:
|
||||
# NetworkManager.login("user@example.com", "password123", func(success, data, error):
|
||||
# if success:
|
||||
# print("登录成功: ", data)
|
||||
# else:
|
||||
# print("登录失败: ", error.message)
|
||||
# )
|
||||
func login(identifier: String, password: String, callback: Callable = Callable()) -> String:
|
||||
var data = {
|
||||
"identifier": identifier,
|
||||
@@ -457,24 +472,41 @@ func send_request(endpoint: String, method: RequestType, headers: PackedStringAr
|
||||
var godot_method = _convert_to_godot_method(method)
|
||||
var error = http_request.request(full_url, headers, godot_method, body)
|
||||
|
||||
print("=== 发送网络请求 ===")
|
||||
print("请求ID: ", request_id)
|
||||
print("URL: ", full_url)
|
||||
print("方法: ", RequestType.keys()[method])
|
||||
print("Headers: ", headers)
|
||||
print("Body: ", body if body.length() < 200 else body.substr(0, 200) + "...")
|
||||
print("发送结果: ", error)
|
||||
|
||||
if error != OK:
|
||||
push_error("NetworkManager: 请求发送失败,错误码: %d" % error)
|
||||
print("请求发送失败,错误代码: ", error)
|
||||
_handle_request_error(request_id, ErrorType.NETWORK_ERROR, "网络请求发送失败: " + str(error))
|
||||
return ""
|
||||
|
||||
return request_id
|
||||
|
||||
# 请求完成回调
|
||||
func _on_request_completed(request_id: String, _result: int, response_code: int,
|
||||
_headers: PackedStringArray, body: PackedByteArray):
|
||||
func _on_request_completed(request_id: String, result: int, response_code: int,
|
||||
headers: PackedStringArray, body: PackedByteArray):
|
||||
print("=== 网络请求完成 ===")
|
||||
print("请求ID: ", request_id)
|
||||
print("结果: ", result)
|
||||
print("状态码: ", response_code)
|
||||
print("响应头: ", headers)
|
||||
|
||||
# 获取请求信息
|
||||
if not active_requests.has(request_id):
|
||||
push_warning("NetworkManager: 未找到请求ID %s" % request_id)
|
||||
print("警告: 未找到请求ID ", request_id)
|
||||
return
|
||||
|
||||
var _request_info = active_requests[request_id]
|
||||
var response_text = body.get_string_from_utf8()
|
||||
|
||||
print("响应体长度: ", body.size(), " 字节")
|
||||
print("响应内容: ", response_text if response_text.length() < 500 else response_text.substr(0, 500) + "...")
|
||||
|
||||
# 处理网络连接失败
|
||||
if response_code == 0:
|
||||
_handle_request_error(request_id, ErrorType.NETWORK_ERROR, "网络连接失败,请检查网络连接")
|
||||
@@ -510,11 +542,13 @@ func _handle_response(request_id: String, response_code: int, data: Dictionary):
|
||||
# 特殊情况:206测试模式 - 根据API文档,这是成功的测试模式响应
|
||||
elif response_code == 206 and error_code == "TEST_MODE_ONLY":
|
||||
is_success = true
|
||||
print("🧪 测试模式响应: ", message)
|
||||
# 201创建成功
|
||||
elif response_code == 201:
|
||||
is_success = true
|
||||
|
||||
if is_success:
|
||||
print("✅ 请求成功: ", request_id)
|
||||
# 发送成功信号
|
||||
request_completed.emit(request_id, true, data)
|
||||
|
||||
@@ -522,6 +556,8 @@ func _handle_response(request_id: String, response_code: int, data: Dictionary):
|
||||
if request_info.callback.is_valid():
|
||||
request_info.callback.call(true, data, {})
|
||||
else:
|
||||
print("❌ 请求失败: ", request_id, " - HTTP:", response_code, " 错误码:", error_code, " 消息:", message)
|
||||
|
||||
# 确定错误类型
|
||||
var error_type = _determine_error_type(response_code, error_code)
|
||||
|
||||
@@ -543,7 +579,7 @@ func _handle_response(request_id: String, response_code: int, data: Dictionary):
|
||||
|
||||
# 处理请求错误
|
||||
func _handle_request_error(request_id: String, error_type: ErrorType, message: String):
|
||||
push_error("NetworkManager: 请求错误 %s - %s" % [request_id, message])
|
||||
print("❌ 请求错误: ", request_id, " - ", message)
|
||||
|
||||
# 发送错误信号
|
||||
request_failed.emit(request_id, ErrorType.keys()[error_type], message)
|
||||
@@ -602,6 +638,8 @@ func _cleanup_request(request_id: String):
|
||||
|
||||
# 从活动请求中移除
|
||||
active_requests.erase(request_id)
|
||||
|
||||
print("🧹 清理请求: ", request_id)
|
||||
|
||||
# 转换请求方法
|
||||
func _convert_to_godot_method(method: RequestType) -> HTTPClient.Method:
|
||||
@@ -624,12 +662,14 @@ func _convert_to_godot_method(method: RequestType) -> HTTPClient.Method:
|
||||
# 取消请求
|
||||
func cancel_request(request_id: String) -> bool:
|
||||
if active_requests.has(request_id):
|
||||
print("🚫 取消请求: ", request_id)
|
||||
_cleanup_request(request_id)
|
||||
return true
|
||||
return false
|
||||
|
||||
# 取消所有请求
|
||||
func cancel_all_requests():
|
||||
print("🚫 取消所有请求")
|
||||
var request_ids = active_requests.keys()
|
||||
for request_id in request_ids:
|
||||
cancel_request(request_id)
|
||||
|
||||
1
_Core/managers/NetworkManager.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dr7v30wheetca
|
||||
@@ -128,15 +128,21 @@ func handle_send_verification_code_response(success: bool, data: Dictionary, err
|
||||
var error_code = data.get("error_code", "")
|
||||
if error_code == "TEST_MODE_ONLY":
|
||||
result.success = true
|
||||
result.message = "🧪 测试模式:验证码已生成"
|
||||
result.message = "🧪 测试模式:验证码已生成,请查看控制台"
|
||||
result.toast_type = "success"
|
||||
|
||||
# 在控制台显示验证码
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
print("🔑 测试模式验证码: ", data.data.verification_code)
|
||||
result.message += "\n验证码: " + str(data.data.verification_code)
|
||||
else:
|
||||
result.success = true
|
||||
result.message = "📧 验证码已发送到您的邮箱,请查收"
|
||||
result.toast_type = "success"
|
||||
|
||||
# 开发环境下显示验证码
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
print("🔑 开发环境验证码: ", data.data.verification_code)
|
||||
else:
|
||||
result = _handle_send_code_error(data, error_info)
|
||||
|
||||
@@ -150,15 +156,18 @@ func handle_send_login_code_response(success: bool, data: Dictionary, error_info
|
||||
var error_code = data.get("error_code", "")
|
||||
if error_code == "TEST_MODE_ONLY":
|
||||
result.success = true
|
||||
result.message = "测试模式:登录验证码已生成"
|
||||
result.message = "测试模式:登录验证码已生成,请查看控制台"
|
||||
result.toast_type = "success"
|
||||
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
result.message += "\n验证码: " + str(data.data.verification_code)
|
||||
print("测试模式登录验证码: ", data.data.verification_code)
|
||||
else:
|
||||
result.success = true
|
||||
result.message = "登录验证码已发送,请查收"
|
||||
result.toast_type = "success"
|
||||
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
print("开发环境登录验证码: ", data.data.verification_code)
|
||||
else:
|
||||
result = _handle_send_login_code_error(data, error_info)
|
||||
|
||||
@@ -205,15 +214,18 @@ func handle_resend_email_verification_response(success: bool, data: Dictionary,
|
||||
var error_code = data.get("error_code", "")
|
||||
if error_code == "TEST_MODE_ONLY":
|
||||
result.success = true
|
||||
result.message = "🧪 测试模式:验证码已重新生成"
|
||||
result.message = "🧪 测试模式:验证码已重新生成,请查看控制台"
|
||||
result.toast_type = "success"
|
||||
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
result.message += "\n验证码: " + str(data.data.verification_code)
|
||||
print("🔑 测试模式重新发送验证码: ", data.data.verification_code)
|
||||
else:
|
||||
result.success = true
|
||||
result.message = "📧 验证码已重新发送到您的邮箱,请查收"
|
||||
result.toast_type = "success"
|
||||
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
print("🔑 开发环境重新发送验证码: ", data.data.verification_code)
|
||||
else:
|
||||
result = _handle_resend_email_verification_error(data, error_info)
|
||||
|
||||
@@ -227,15 +239,18 @@ func handle_forgot_password_response(success: bool, data: Dictionary, error_info
|
||||
var error_code = data.get("error_code", "")
|
||||
if error_code == "TEST_MODE_ONLY":
|
||||
result.success = true
|
||||
result.message = "🧪 测试模式:重置验证码已生成"
|
||||
result.message = "🧪 测试模式:重置验证码已生成,请查看控制台"
|
||||
result.toast_type = "success"
|
||||
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
result.message += "\n验证码: " + str(data.data.verification_code)
|
||||
print("🔑 测试模式重置验证码: ", data.data.verification_code)
|
||||
else:
|
||||
result.success = true
|
||||
result.message = "📧 重置验证码已发送,请查收"
|
||||
result.toast_type = "success"
|
||||
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
print("🔑 开发环境重置验证码: ", data.data.verification_code)
|
||||
else:
|
||||
result = _handle_forgot_password_error(data, error_info)
|
||||
|
||||
|
||||
1
_Core/managers/ResponseHandler.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://nseguk2ytiw6
|
||||
@@ -37,20 +37,29 @@ signal scene_change_started(scene_name: String)
|
||||
var current_scene_name: String = "" # 当前场景名称
|
||||
var is_changing_scene: bool = false # 是否正在切换场景
|
||||
var _next_scene_position: Variant = null # 下一个场景的初始位置 (Vector2 or null)
|
||||
var _next_spawn_name: String = "" # 下一个场景的出生点名称 (String)
|
||||
|
||||
# 场景路径映射表
|
||||
# 将场景名称映射到实际的文件路径
|
||||
# 便于统一管理和修改场景路径
|
||||
var scene_paths: Dictionary = {
|
||||
"main": "res://scenes/MainScene.tscn", # 主场景 - 游戏入口
|
||||
"square": "res://scenes/Maps/square.tscn", # 广场地图
|
||||
"room": "res://scenes/Maps/room.tscn", # 房间地图
|
||||
"fountain": "res://scenes/Maps/fountain.tscn", # 喷泉地图
|
||||
"datawhale_home": "res://scenes/Maps/datawhale_home.tscn", # 数据鲸鱼之家
|
||||
"community": "res://scenes/Maps/community.tscn" # 社区地图
|
||||
"auth": "res://scenes/ui/LoginWindow.tscn", # 认证场景 - 登录窗口
|
||||
"game": "res://scenes/maps/game_scene.tscn", # 游戏场景 - 主要游戏内容
|
||||
"battle": "res://scenes/maps/battle_scene.tscn", # 战斗场景 - 战斗系统
|
||||
"inventory": "res://scenes/ui/InventoryWindow.tscn", # 背包界面
|
||||
"shop": "res://scenes/ui/ShopWindow.tscn", # 商店界面
|
||||
"settings": "res://scenes/ui/SettingsWindow.tscn", # 设置界面
|
||||
"room": "res://scenes/Maps/room.tscn", # 房间场景
|
||||
"square": "res://scenes/Maps/square.tscn" # 广场场景
|
||||
}
|
||||
|
||||
# ============ 生命周期方法 ============
|
||||
|
||||
# 初始化场景管理器
|
||||
# 在节点准备就绪时调用
|
||||
func _ready():
|
||||
print("SceneManager 初始化完成")
|
||||
|
||||
# ============ 场景切换方法 ============
|
||||
|
||||
# 切换到指定场景
|
||||
@@ -71,6 +80,8 @@ var scene_paths: Dictionary = {
|
||||
#
|
||||
# 使用示例:
|
||||
# var success = SceneManager.change_scene("main", true)
|
||||
# if success:
|
||||
# print("场景切换成功")
|
||||
#
|
||||
# 注意事项:
|
||||
# - 场景切换是异步操作
|
||||
@@ -79,15 +90,16 @@ var scene_paths: Dictionary = {
|
||||
func change_scene(scene_name: String, use_transition: bool = true):
|
||||
# 防止重复切换
|
||||
if is_changing_scene:
|
||||
push_warning("SceneManager: 场景切换中,忽略新的切换请求")
|
||||
print("场景切换中,忽略新的切换请求")
|
||||
return false
|
||||
|
||||
# 检查场景是否存在
|
||||
if not scene_paths.has(scene_name):
|
||||
push_error("SceneManager: 未找到场景 %s" % scene_name)
|
||||
print("错误: 未找到场景 ", scene_name)
|
||||
return false
|
||||
|
||||
var scene_path = scene_paths[scene_name]
|
||||
print("开始切换场景: ", current_scene_name, " -> ", scene_name)
|
||||
|
||||
# 设置切换状态
|
||||
is_changing_scene = true
|
||||
@@ -100,7 +112,7 @@ func change_scene(scene_name: String, use_transition: bool = true):
|
||||
# 执行场景切换
|
||||
var error = get_tree().change_scene_to_file(scene_path)
|
||||
if error != OK:
|
||||
push_error("SceneManager: 场景切换失败 %s -> %s, 错误码: %d" % [current_scene_name, scene_name, error])
|
||||
print("场景切换失败: ", error)
|
||||
is_changing_scene = false
|
||||
return false
|
||||
|
||||
@@ -113,82 +125,28 @@ func change_scene(scene_name: String, use_transition: bool = true):
|
||||
if use_transition:
|
||||
await hide_transition()
|
||||
|
||||
print("场景切换完成: ", scene_name)
|
||||
return true
|
||||
|
||||
# ============ 查询方法 ============
|
||||
|
||||
# 获取当前场景名称
|
||||
#
|
||||
#
|
||||
# 返回值:
|
||||
# String - 当前场景的名称
|
||||
func get_current_scene_name() -> String:
|
||||
return current_scene_name
|
||||
|
||||
# ============ 场景位置和出生点管理 ============
|
||||
|
||||
# 设置下一个场景的初始位置
|
||||
#
|
||||
# 参数:
|
||||
# pos: Vector2 - 玩家在下一个场景的初始位置
|
||||
#
|
||||
# 功能:
|
||||
# - 用于场景切换时传递玩家位置信息
|
||||
# - 配合 DoorTeleport 等传送机制使用
|
||||
#
|
||||
# 使用示例:
|
||||
# SceneManager.set_next_scene_position(Vector2(100, 200))
|
||||
# SceneManager.change_scene("room")
|
||||
func set_next_scene_position(pos: Vector2) -> void:
|
||||
_next_scene_position = pos
|
||||
|
||||
# 获取并清除下一个场景的初始位置
|
||||
#
|
||||
# 返回值:
|
||||
# Variant - Vector2 位置或 null(如果未设置)
|
||||
#
|
||||
# 功能:
|
||||
# - 获取预设的场景初始位置
|
||||
# - 获取后自动清除,避免影响后续场景切换
|
||||
#
|
||||
# 注意事项:
|
||||
# - 此方法会清除存储的位置,只能获取一次
|
||||
# - 如果未设置位置,返回 null
|
||||
func get_next_scene_position() -> Variant:
|
||||
var pos = _next_scene_position
|
||||
_next_scene_position = null
|
||||
return pos
|
||||
|
||||
# 设置下一个场景的出生点名称
|
||||
#
|
||||
# 参数:
|
||||
# spawn_name: String - 出生点节点的名称
|
||||
#
|
||||
# 功能:
|
||||
# - 指定玩家在下一个场景应该出现在哪个出生点
|
||||
# - 配合场景中的 Marker2D 出生点使用
|
||||
#
|
||||
# 使用示例:
|
||||
# SceneManager.set_next_spawn_name("DoorExit")
|
||||
# SceneManager.change_scene("square")
|
||||
func set_next_spawn_name(spawn_name: String) -> void:
|
||||
_next_spawn_name = spawn_name
|
||||
|
||||
# 获取并清除下一个场景的出生点名称
|
||||
#
|
||||
# 返回值:
|
||||
# String - 出生点名称(如果未设置则返回空字符串)
|
||||
#
|
||||
# 功能:
|
||||
# - 获取预设的出生点名称
|
||||
# - 获取后自动清除,避免影响后续场景切换
|
||||
#
|
||||
# 注意事项:
|
||||
# - 此方法会清除存储的名称,只能获取一次
|
||||
# - 如果未设置名称,返回空字符串
|
||||
func get_next_spawn_name() -> String:
|
||||
var spawn_name: String = _next_spawn_name
|
||||
_next_spawn_name = ""
|
||||
return spawn_name
|
||||
|
||||
# ============ 场景注册方法 ============
|
||||
|
||||
@@ -206,6 +164,7 @@ func get_next_spawn_name() -> String:
|
||||
# SceneManager.register_scene("boss_battle", "res://scenes/boss/boss_battle.tscn")
|
||||
func register_scene(scene_name: String, scene_path: String):
|
||||
scene_paths[scene_name] = scene_path
|
||||
print("注册场景: ", scene_name, " -> ", scene_path)
|
||||
|
||||
# ============ 过渡效果方法 ============
|
||||
|
||||
@@ -221,7 +180,8 @@ func register_scene(scene_name: String, scene_path: String):
|
||||
#
|
||||
# TODO: 实现淡入淡出、滑动等过渡效果
|
||||
func show_transition():
|
||||
# TODO: 实现场景切换过渡效果(当前仅占位延时)
|
||||
# TODO: 实现场景切换过渡效果
|
||||
print("显示场景切换过渡效果")
|
||||
await get_tree().create_timer(0.2).timeout
|
||||
|
||||
# 隐藏场景切换过渡效果
|
||||
@@ -236,5 +196,6 @@ func show_transition():
|
||||
#
|
||||
# TODO: 实现与show_transition()对应的隐藏效果
|
||||
func hide_transition():
|
||||
# TODO: 隐藏场景切换过渡效果(当前仅占位延时)
|
||||
# TODO: 隐藏场景切换过渡效果
|
||||
print("隐藏场景切换过渡效果")
|
||||
await get_tree().create_timer(0.2).timeout
|
||||
|
||||
1
_Core/managers/SceneManager.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://d3l286ti5gqhw
|
||||
@@ -40,6 +40,7 @@ var toast_counter: int = 0 # Toast计数器,用于生成
|
||||
# container: Control - Toast消息的容器节点
|
||||
func setup(container: Control):
|
||||
toast_container = container
|
||||
print("ToastManager 初始化完成")
|
||||
|
||||
# ============ 公共方法 ============
|
||||
|
||||
@@ -50,9 +51,10 @@ func setup(container: Control):
|
||||
# is_success: bool - 是否为成功消息(影响颜色)
|
||||
func show_toast(message: String, is_success: bool = true):
|
||||
if toast_container == null:
|
||||
push_error("ToastManager: toast_container 节点不存在")
|
||||
print("错误: toast_container 节点不存在")
|
||||
return
|
||||
|
||||
print("显示Toast消息: ", message, " 成功: ", is_success)
|
||||
_create_toast_instance(message, is_success)
|
||||
|
||||
# 清理所有Toast
|
||||
@@ -121,17 +123,21 @@ func _create_toast_instance(message: String, is_success: bool):
|
||||
|
||||
# 平台特定的字体处理
|
||||
if is_web:
|
||||
print("Web平台Toast字体处理")
|
||||
# Web平台使用主题文件
|
||||
var chinese_theme = load("res://assets/ui/chinese_theme.tres")
|
||||
if chinese_theme:
|
||||
text_label.theme = chinese_theme
|
||||
print("Web平台应用中文主题")
|
||||
else:
|
||||
push_warning("ToastManager: Web平台中文主题加载失败,使用默认字体")
|
||||
print("Web平台中文主题加载失败")
|
||||
else:
|
||||
print("桌面平台Toast字体处理")
|
||||
# 桌面平台直接加载中文字体
|
||||
var desktop_chinese_font = load("res://assets/fonts/msyh.ttc")
|
||||
if desktop_chinese_font:
|
||||
text_label.add_theme_font_override("font", desktop_chinese_font)
|
||||
print("桌面平台使用中文字体")
|
||||
|
||||
text_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
text_label.custom_minimum_size = Vector2(280, 0)
|
||||
@@ -225,4 +231,4 @@ func _rearrange_toasts():
|
||||
if is_instance_valid(toast):
|
||||
var tween = toast_container.create_tween()
|
||||
tween.tween_property(toast, "position:y", current_y, 0.2)
|
||||
current_y += toast.size.y + 15
|
||||
current_y += toast.size.y + 15
|
||||
1
_Core/managers/ToastManager.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://buk7d21cag262
|
||||
@@ -1,460 +0,0 @@
|
||||
extends Node
|
||||
|
||||
# ============================================================================
|
||||
# WebSocketManager.gd - WebSocket 连接生命周期管理(原生 WebSocket 版本)
|
||||
# ============================================================================
|
||||
# 管理 WebSocket 连接状态、自动重连和错误恢复
|
||||
#
|
||||
# 核心职责:
|
||||
# - 连接状态管理(断开、连接中、已连接、重连中)
|
||||
# - 自动重连机制(指数退避)
|
||||
# - 连接错误恢复
|
||||
# - WebSocket 消息发送/接收
|
||||
# ============================================================================
|
||||
# 使用方式:
|
||||
# WebSocketManager.connect_to_game_server()
|
||||
# WebSocketManager.connection_state_changed.connect(_on_state_changed)
|
||||
#
|
||||
# 注意事项:
|
||||
# - 作为自动加载单例,全局可访问
|
||||
# - 自动处理连接断开和重连
|
||||
# - 通过信号通知连接状态变化
|
||||
# ============================================================================
|
||||
|
||||
class_name ChatWebSocketManager
|
||||
|
||||
# ============================================================================
|
||||
# 信号定义
|
||||
# ============================================================================
|
||||
|
||||
# 连接状态变化信号
|
||||
# 参数:
|
||||
# new_state: ConnectionState - 新的连接状态
|
||||
signal connection_state_changed(new_state: ConnectionState)
|
||||
|
||||
# 连接丢失信号
|
||||
signal connection_lost()
|
||||
|
||||
# 重连成功信号
|
||||
signal reconnection_succeeded()
|
||||
|
||||
# 重连失败信号
|
||||
# 参数:
|
||||
# attempt: int - 当前重连尝试次数
|
||||
# max_attempts: int - 最大重连次数
|
||||
signal reconnection_failed(attempt: int, max_attempts: int)
|
||||
|
||||
# WebSocket 消息接收信号
|
||||
# 参数:
|
||||
# message: String - 接收到的消息内容(JSON 字符串)
|
||||
signal data_received(message: String)
|
||||
|
||||
# ============================================================================
|
||||
# 枚举定义
|
||||
# ============================================================================
|
||||
|
||||
# 连接状态枚举
|
||||
enum ConnectionState {
|
||||
DISCONNECTED, # 未连接
|
||||
CONNECTING, # 连接中
|
||||
CONNECTED, # 已连接
|
||||
RECONNECTING, # 重连中
|
||||
ERROR # 错误状态
|
||||
}
|
||||
|
||||
# ============================================================================
|
||||
# 常量定义
|
||||
# ============================================================================
|
||||
|
||||
# WebSocket 服务器 URL(原生 WebSocket)
|
||||
const WEBSOCKET_URL: String = "wss://whaletownend.xinghangee.icu/game"
|
||||
|
||||
# 默认最大重连次数
|
||||
const DEFAULT_MAX_RECONNECT_ATTEMPTS: int = 5
|
||||
|
||||
# 默认重连基础延迟(秒)
|
||||
const DEFAULT_RECONNECT_BASE_DELAY: float = 3.0
|
||||
|
||||
# 最大重连延迟(秒)
|
||||
const MAX_RECONNECT_DELAY: float = 30.0
|
||||
|
||||
# ============================================================================
|
||||
# 成员变量
|
||||
# ============================================================================
|
||||
|
||||
# WebSocket peer
|
||||
var _websocket_peer: WebSocketPeer = WebSocketPeer.new()
|
||||
|
||||
# 当前连接状态
|
||||
var _connection_state: ConnectionState = ConnectionState.DISCONNECTED
|
||||
|
||||
# 自动重连启用标志
|
||||
var _auto_reconnect_enabled: bool = true
|
||||
|
||||
# 最大重连次数
|
||||
var _max_reconnect_attempts: int = DEFAULT_MAX_RECONNECT_ATTEMPTS
|
||||
|
||||
# 重连基础延迟
|
||||
var _reconnect_base_delay: float = DEFAULT_RECONNECT_BASE_DELAY
|
||||
|
||||
# 当前重连尝试次数
|
||||
var _reconnect_attempt: int = 0
|
||||
|
||||
# 重连定时器
|
||||
var _reconnect_timer: Timer = Timer.new()
|
||||
|
||||
# 是否为正常关闭(非异常断开)
|
||||
var _clean_close: bool = true
|
||||
|
||||
# 当前 CLOSED 状态是否已经处理过(防止每帧重复处理 close 事件)
|
||||
var _closed_state_handled: bool = false
|
||||
|
||||
# 心跳定时器
|
||||
var _heartbeat_timer: Timer = Timer.new()
|
||||
|
||||
# 心跳间隔(秒)
|
||||
const HEARTBEAT_INTERVAL: float = 30.0
|
||||
|
||||
# ============================================================================
|
||||
# 生命周期方法
|
||||
# ============================================================================
|
||||
|
||||
# 初始化
|
||||
func _ready() -> void:
|
||||
# 设置重连定时器
|
||||
_setup_reconnect_timer()
|
||||
|
||||
# 设置心跳定时器
|
||||
_setup_heartbeat_timer()
|
||||
|
||||
# 启动处理循环
|
||||
set_process(true)
|
||||
|
||||
# 处理每帧
|
||||
func _process(_delta: float) -> void:
|
||||
# 检查 WebSocket 状态变化
|
||||
_check_websocket_state()
|
||||
|
||||
var state: WebSocketPeer.State = _websocket_peer.get_ready_state()
|
||||
|
||||
if state == WebSocketPeer.STATE_OPEN:
|
||||
# 接收数据
|
||||
_websocket_peer.poll()
|
||||
|
||||
# 处理收到的数据
|
||||
while _websocket_peer.get_available_packet_count() > 0:
|
||||
var packet: PackedByteArray = _websocket_peer.get_packet()
|
||||
var message: String = packet.get_string_from_utf8()
|
||||
|
||||
# 发射消息接收信号
|
||||
data_received.emit(message)
|
||||
|
||||
# 清理
|
||||
func _exit_tree() -> void:
|
||||
_disconnect()
|
||||
|
||||
if is_instance_valid(_reconnect_timer):
|
||||
_reconnect_timer.stop()
|
||||
_reconnect_timer.queue_free()
|
||||
|
||||
if is_instance_valid(_heartbeat_timer):
|
||||
_heartbeat_timer.stop()
|
||||
_heartbeat_timer.queue_free()
|
||||
|
||||
# ============================================================================
|
||||
# 公共 API - 连接管理
|
||||
# ============================================================================
|
||||
|
||||
# 连接到游戏服务器
|
||||
func connect_to_game_server(is_reconnect_attempt: bool = false) -> void:
|
||||
if _connection_state == ConnectionState.CONNECTED or _connection_state == ConnectionState.CONNECTING:
|
||||
push_warning("已经在连接或已连接状态")
|
||||
return
|
||||
|
||||
if is_reconnect_attempt:
|
||||
_set_connection_state(ConnectionState.RECONNECTING)
|
||||
else:
|
||||
_set_connection_state(ConnectionState.CONNECTING)
|
||||
_clean_close = true
|
||||
_closed_state_handled = false
|
||||
# 仅在首次/手动连接时重置重连计数,重连流程保持累计尝试次数
|
||||
if not is_reconnect_attempt:
|
||||
_reconnect_attempt = 0
|
||||
|
||||
var err: Error = _websocket_peer.connect_to_url(WEBSOCKET_URL)
|
||||
if err != OK:
|
||||
push_error("WebSocketManager: 连接失败 - %s" % error_string(err))
|
||||
_set_connection_state(ConnectionState.ERROR)
|
||||
return
|
||||
|
||||
# 启动心跳
|
||||
_start_heartbeat()
|
||||
|
||||
# 断开 WebSocket 连接
|
||||
func disconnect_websocket() -> void:
|
||||
_disconnect()
|
||||
|
||||
# 断开连接(内部方法)
|
||||
func _disconnect() -> void:
|
||||
_clean_close = true
|
||||
|
||||
# 停止重连定时器
|
||||
_reconnect_timer.stop()
|
||||
|
||||
# 停止心跳
|
||||
_heartbeat_timer.stop()
|
||||
|
||||
# 关闭 WebSocket
|
||||
if _websocket_peer.get_ready_state() == WebSocketPeer.STATE_OPEN:
|
||||
_websocket_peer.close()
|
||||
|
||||
_set_connection_state(ConnectionState.DISCONNECTED)
|
||||
|
||||
# 检查 WebSocket 是否已连接
|
||||
#
|
||||
# 返回值:
|
||||
# bool - WebSocket 是否已连接
|
||||
func is_websocket_connected() -> bool:
|
||||
return _connection_state == ConnectionState.CONNECTED
|
||||
|
||||
# 获取当前连接状态
|
||||
#
|
||||
# 返回值:
|
||||
# ConnectionState - 当前连接状态
|
||||
func get_connection_state() -> ConnectionState:
|
||||
return _connection_state
|
||||
|
||||
# ============================================================================
|
||||
# 公共 API - 消息发送
|
||||
# ============================================================================
|
||||
|
||||
# 发送 WebSocket 消息
|
||||
#
|
||||
# 参数:
|
||||
# message: String - 要发送的消息内容(JSON 字符串)
|
||||
#
|
||||
# 返回值:
|
||||
# Error - 错误码,OK 表示成功
|
||||
func send_message(message: String) -> Error:
|
||||
if _websocket_peer.get_ready_state() != WebSocketPeer.STATE_OPEN:
|
||||
push_warning("WebSocketManager: 未连接,无法发送消息")
|
||||
return ERR_UNCONFIGURED
|
||||
|
||||
var err: Error = _websocket_peer.send_text(message)
|
||||
if err != OK:
|
||||
push_error("WebSocketManager: 发送消息失败 - %s" % error_string(err))
|
||||
return err
|
||||
|
||||
return OK
|
||||
|
||||
# ============================================================================
|
||||
# 公共 API - 自动重连
|
||||
# ============================================================================
|
||||
|
||||
# 启用/禁用自动重连
|
||||
#
|
||||
# 参数:
|
||||
# enabled: bool - 是否启用自动重连
|
||||
# max_attempts: int - 最大重连次数(默认 5)
|
||||
# base_delay: float - 基础重连延迟,秒(默认 3.0)
|
||||
#
|
||||
# 使用示例:
|
||||
# WebSocketManager.enable_auto_reconnect(true, 5, 3.0)
|
||||
func enable_auto_reconnect(enabled: bool, max_attempts: int = DEFAULT_MAX_RECONNECT_ATTEMPTS, base_delay: float = DEFAULT_RECONNECT_BASE_DELAY) -> void:
|
||||
_auto_reconnect_enabled = enabled
|
||||
_max_reconnect_attempts = max_attempts
|
||||
_reconnect_base_delay = base_delay
|
||||
|
||||
# 获取重连信息
|
||||
#
|
||||
# 返回值:
|
||||
# Dictionary - 重连信息 {enabled, attempt, max_attempts, delay}
|
||||
func get_reconnect_info() -> Dictionary:
|
||||
return {
|
||||
"enabled": _auto_reconnect_enabled,
|
||||
"attempt": _reconnect_attempt,
|
||||
"max_attempts": _max_reconnect_attempts,
|
||||
"next_delay": _calculate_reconnect_delay() if _connection_state == ConnectionState.RECONNECTING else 0.0
|
||||
}
|
||||
|
||||
# ============================================================================
|
||||
# 内部方法 - 连接状态管理
|
||||
# ============================================================================
|
||||
|
||||
# 设置连接状态
|
||||
func _set_connection_state(new_state: ConnectionState) -> void:
|
||||
if _connection_state == new_state:
|
||||
return
|
||||
|
||||
_connection_state = new_state
|
||||
|
||||
# 发射信号
|
||||
connection_state_changed.emit(new_state)
|
||||
|
||||
# ============================================================================
|
||||
# 内部方法 - WebSocket 状态监控
|
||||
# ============================================================================
|
||||
|
||||
# 检查 WebSocket 状态变化
|
||||
func _check_websocket_state() -> void:
|
||||
# 必须先 poll 才能获取最新状态
|
||||
_websocket_peer.poll()
|
||||
|
||||
var state: WebSocketPeer.State = _websocket_peer.get_ready_state()
|
||||
|
||||
match state:
|
||||
WebSocketPeer.STATE_CONNECTING:
|
||||
_closed_state_handled = false
|
||||
|
||||
# 正在连接
|
||||
if _connection_state != ConnectionState.CONNECTING and _connection_state != ConnectionState.RECONNECTING:
|
||||
_set_connection_state(ConnectionState.CONNECTING)
|
||||
|
||||
WebSocketPeer.STATE_OPEN:
|
||||
_closed_state_handled = false
|
||||
|
||||
# 连接成功
|
||||
if _connection_state != ConnectionState.CONNECTED:
|
||||
_on_websocket_connected()
|
||||
|
||||
WebSocketPeer.STATE_CLOSING:
|
||||
_closed_state_handled = false
|
||||
|
||||
# 正在关闭
|
||||
pass
|
||||
|
||||
WebSocketPeer.STATE_CLOSED:
|
||||
if _closed_state_handled:
|
||||
return
|
||||
|
||||
_closed_state_handled = true
|
||||
|
||||
# 仅在连接生命周期中发生的关闭才触发关闭处理
|
||||
var should_handle_close: bool = (
|
||||
_connection_state == ConnectionState.CONNECTED
|
||||
or _connection_state == ConnectionState.CONNECTING
|
||||
or _connection_state == ConnectionState.RECONNECTING
|
||||
)
|
||||
if should_handle_close:
|
||||
var close_code: int = _websocket_peer.get_close_code()
|
||||
_on_websocket_closed(_is_clean_close_code(close_code))
|
||||
|
||||
# WebSocket 连接成功处理
|
||||
func _on_websocket_connected() -> void:
|
||||
# 如果是重连,发射重连成功信号
|
||||
if _connection_state == ConnectionState.RECONNECTING:
|
||||
_reconnect_attempt = 0
|
||||
reconnection_succeeded.emit()
|
||||
|
||||
_set_connection_state(ConnectionState.CONNECTED)
|
||||
|
||||
# WebSocket 连接关闭处理
|
||||
func _on_websocket_closed(clean_close: bool) -> void:
|
||||
_clean_close = clean_close
|
||||
|
||||
# 如果是异常断开且启用了自动重连
|
||||
if not clean_close and _auto_reconnect_enabled:
|
||||
connection_lost.emit()
|
||||
_attempt_reconnect()
|
||||
else:
|
||||
_set_connection_state(ConnectionState.DISCONNECTED)
|
||||
|
||||
# 判断关闭码是否为干净关闭
|
||||
# Godot 中 close_code == -1 表示非干净关闭(异常断开)
|
||||
func _is_clean_close_code(close_code: int) -> bool:
|
||||
return close_code != -1
|
||||
|
||||
# ============================================================================
|
||||
# 内部方法 - 重连机制
|
||||
# ============================================================================
|
||||
|
||||
# 设置重连定时器
|
||||
func _setup_reconnect_timer() -> void:
|
||||
_reconnect_timer = Timer.new()
|
||||
_reconnect_timer.one_shot = true
|
||||
_reconnect_timer.autostart = false
|
||||
add_child(_reconnect_timer)
|
||||
|
||||
_reconnect_timer.timeout.connect(_on_reconnect_timeout)
|
||||
|
||||
# 尝试重连
|
||||
func _attempt_reconnect() -> void:
|
||||
# 检查是否超过最大重连次数
|
||||
if _reconnect_attempt >= _max_reconnect_attempts:
|
||||
push_error("WebSocketManager: 达到最大重连次数 (%d),停止重连" % _max_reconnect_attempts)
|
||||
reconnection_failed.emit(_reconnect_attempt, _max_reconnect_attempts)
|
||||
_set_connection_state(ConnectionState.ERROR)
|
||||
return
|
||||
|
||||
_reconnect_attempt += 1
|
||||
_set_connection_state(ConnectionState.RECONNECTING)
|
||||
|
||||
# 计算重连延迟(指数退避)
|
||||
var delay: float = _calculate_reconnect_delay()
|
||||
|
||||
# 启动重连定时器
|
||||
_reconnect_timer.start(delay)
|
||||
|
||||
# 计算重连延迟(指数退避)
|
||||
func _calculate_reconnect_delay() -> float:
|
||||
# 指数退避: base_delay * 2^(attempt-1)
|
||||
var delay: float = _reconnect_base_delay * pow(2.0, _reconnect_attempt - 1)
|
||||
|
||||
# 限制最大延迟
|
||||
return min(delay, MAX_RECONNECT_DELAY)
|
||||
|
||||
# 重连定时器超时处理
|
||||
func _on_reconnect_timeout() -> void:
|
||||
_clean_close = false
|
||||
connect_to_game_server(true)
|
||||
|
||||
# ============================================================================
|
||||
# 内部方法 - 心跳机制
|
||||
# ============================================================================
|
||||
|
||||
# 设置心跳定时器
|
||||
func _setup_heartbeat_timer() -> void:
|
||||
_heartbeat_timer = Timer.new()
|
||||
_heartbeat_timer.wait_time = HEARTBEAT_INTERVAL
|
||||
_heartbeat_timer.one_shot = false
|
||||
_heartbeat_timer.autostart = false
|
||||
add_child(_heartbeat_timer)
|
||||
|
||||
_heartbeat_timer.timeout.connect(_on_heartbeat)
|
||||
|
||||
# 启动心跳
|
||||
func _start_heartbeat() -> void:
|
||||
_heartbeat_timer.start()
|
||||
|
||||
# 停止心跳
|
||||
func _stop_heartbeat() -> void:
|
||||
_heartbeat_timer.stop()
|
||||
|
||||
# 心跳超时处理
|
||||
func _on_heartbeat() -> void:
|
||||
# 不发送心跳,避免服务器返回 "消息格式错误"
|
||||
# 如果需要心跳,服务器应该支持特定格式
|
||||
pass
|
||||
|
||||
# ============================================================================
|
||||
# 工具方法
|
||||
# ============================================================================
|
||||
|
||||
# 获取连接状态描述
|
||||
#
|
||||
# 返回值:
|
||||
# String - 连接状态描述
|
||||
func get_state_description() -> String:
|
||||
match _connection_state:
|
||||
ConnectionState.DISCONNECTED:
|
||||
return "未连接"
|
||||
ConnectionState.CONNECTING:
|
||||
return "连接中"
|
||||
ConnectionState.CONNECTED:
|
||||
return "已连接"
|
||||
ConnectionState.RECONNECTING:
|
||||
return "重连中 (%d/%d)" % [_reconnect_attempt, _max_reconnect_attempts]
|
||||
ConnectionState.ERROR:
|
||||
return "错误"
|
||||
_:
|
||||
return "未知状态"
|
||||
@@ -27,6 +27,13 @@ extends Node
|
||||
# 结构: {event_name: [{"callback": Callable, "target": Node}, ...]}
|
||||
var event_listeners: Dictionary = {}
|
||||
|
||||
# ============ 生命周期方法 ============
|
||||
|
||||
# 初始化事件系统
|
||||
# 在节点准备就绪时调用
|
||||
func _ready():
|
||||
print("EventSystem 初始化完成")
|
||||
|
||||
# ============ 事件监听器管理 ============
|
||||
|
||||
# 注册事件监听器
|
||||
@@ -52,11 +59,6 @@ func connect_event(event_name: String, callback: Callable, target: Node = null):
|
||||
if not event_listeners.has(event_name):
|
||||
event_listeners[event_name] = []
|
||||
|
||||
# 避免重复注册同一个监听器
|
||||
for listener in event_listeners[event_name]:
|
||||
if listener.callback == callback and listener.target == target:
|
||||
return
|
||||
|
||||
# 创建监听器信息
|
||||
var listener_info = {
|
||||
"callback": callback,
|
||||
@@ -65,6 +67,7 @@ func connect_event(event_name: String, callback: Callable, target: Node = null):
|
||||
|
||||
# 添加到监听器列表
|
||||
event_listeners[event_name].append(listener_info)
|
||||
print("注册事件监听器: ", event_name, " -> ", callback)
|
||||
|
||||
# 移除事件监听器
|
||||
#
|
||||
@@ -90,6 +93,7 @@ func disconnect_event(event_name: String, callback: Callable, target: Node = nul
|
||||
# 匹配callback和target
|
||||
if listener.callback == callback and listener.target == target:
|
||||
listeners.remove_at(i)
|
||||
print("移除事件监听器: ", event_name, " -> ", callback)
|
||||
break
|
||||
|
||||
# ============ 事件发送 ============
|
||||
@@ -113,11 +117,13 @@ func disconnect_event(event_name: String, callback: Callable, target: Node = nul
|
||||
# - 事件发送是同步的,所有监听器会立即执行
|
||||
# - 如果监听器执行出错,不会影响其他监听器
|
||||
func emit_event(event_name: String, data: Variant = null):
|
||||
print("发送事件: ", event_name, " 数据: ", data)
|
||||
|
||||
# 检查是否有监听器
|
||||
if not event_listeners.has(event_name):
|
||||
return
|
||||
|
||||
var listeners = event_listeners[event_name].duplicate()
|
||||
var listeners = event_listeners[event_name]
|
||||
for listener_info in listeners:
|
||||
var target = listener_info.target
|
||||
var callback = listener_info.callback
|
||||
@@ -155,6 +161,7 @@ func cleanup_invalid_listeners():
|
||||
# 如果目标节点无效,移除监听器
|
||||
if target != null and not is_instance_valid(target):
|
||||
listeners.remove_at(i)
|
||||
print("清理无效监听器: ", event_name)
|
||||
|
||||
# ============ 查询方法 ============
|
||||
|
||||
@@ -185,3 +192,4 @@ func get_listener_count(event_name: String) -> int:
|
||||
# - 使用前请确保所有模块都能正确处理监听器丢失
|
||||
func clear_all_listeners():
|
||||
event_listeners.clear()
|
||||
print("清空所有事件监听器")
|
||||
|
||||
1
_Core/systems/EventSystem.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bfheblucmti24
|
||||
@@ -131,14 +131,13 @@ static func get_grid_rect(grid_pos: Vector2i) -> Rect2:
|
||||
var world_pos = grid_to_world(grid_pos)
|
||||
return Rect2(world_pos, Vector2(GRID_SIZE, GRID_SIZE))
|
||||
|
||||
# 获取网格信息(调试辅助)
|
||||
static func print_grid_info(world_pos: Vector2) -> Dictionary:
|
||||
# 打印网格信息(调试用)
|
||||
static func print_grid_info(world_pos: Vector2) -> void:
|
||||
var grid_pos = world_to_grid(world_pos)
|
||||
var snapped_pos = snap_to_grid(world_pos)
|
||||
var center_pos = grid_to_world_center(grid_pos)
|
||||
return {
|
||||
"world_position": world_pos,
|
||||
"grid_position": grid_pos,
|
||||
"snapped_position": snapped_pos,
|
||||
"center_position": center_pos
|
||||
}
|
||||
|
||||
print("世界坐标: ", world_pos)
|
||||
print("网格坐标: ", grid_pos)
|
||||
print("吸附位置: ", snapped_pos)
|
||||
print("网格中心: ", center_pos)
|
||||
1
_Core/systems/GridSystem.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dceqpffgti4jb
|
||||
@@ -39,7 +39,7 @@ class_name StringUtils
|
||||
#
|
||||
# 使用示例:
|
||||
# if StringUtils.is_valid_email("user@example.com"):
|
||||
# # 邮箱格式正确
|
||||
# print("邮箱格式正确")
|
||||
static func is_valid_email(email: String) -> bool:
|
||||
var regex = RegEx.new()
|
||||
regex.compile("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$")
|
||||
@@ -60,7 +60,7 @@ static func is_valid_email(email: String) -> bool:
|
||||
#
|
||||
# 使用示例:
|
||||
# if StringUtils.is_valid_username("user_123"):
|
||||
# # 用户名格式正确
|
||||
# print("用户名格式正确")
|
||||
static func is_valid_username(username: String) -> bool:
|
||||
# 检查长度
|
||||
if username.is_empty() or username.length() > 50:
|
||||
@@ -92,7 +92,7 @@ static func is_valid_username(username: String) -> bool:
|
||||
# 使用示例:
|
||||
# var result = StringUtils.validate_password_strength("MyPass123!")
|
||||
# if result.valid:
|
||||
# # 可按需展示 result.message
|
||||
# print("密码强度: ", result.message)
|
||||
static func validate_password_strength(password: String) -> Dictionary:
|
||||
var result = {"valid": false, "message": "", "strength": 0}
|
||||
|
||||
@@ -383,4 +383,4 @@ static func get_relative_time_until(utc_time_str: String) -> String:
|
||||
if minutes > 0:
|
||||
return "%d小时%d分钟后" % [hours, minutes]
|
||||
else:
|
||||
return "%d小时后" % hours
|
||||
return "%d小时后" % hours
|
||||
1
_Core/utils/StringUtils.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bu8onmk6q8wic
|
||||
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 96 KiB |
40
assets/characters/payer_44_30.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://krfed1r4qmnp"
|
||||
path="res://.godot/imported/payer_44_30.png-100395b4756c93dec9ce9baa5c5df0f3.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/characters/payer_44_30.png"
|
||||
dest_files=["res://.godot/imported/payer_44_30.png-100395b4756c93dec9ce9baa5c5df0f3.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
|
||||
40
assets/characters/player_spritesheet.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cghab1hkx5lg5"
|
||||
path="res://.godot/imported/player_spritesheet.png-7e76f97a17946ec512358d45f2527da8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/characters/player_spritesheet.png"
|
||||
dest_files=["res://.godot/imported/player_spritesheet.png-7e76f97a17946ec512358d45f2527da8.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
|
||||
40
assets/characters/player_spritesheet_backup.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dyimi462hj6r2"
|
||||
path="res://.godot/imported/player_spritesheet_backup.png-6d8c966a56b0ced39cf1ecf0c772847f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/characters/player_spritesheet_backup.png"
|
||||
dest_files=["res://.godot/imported/player_spritesheet_backup.png-6d8c966a56b0ced39cf1ecf0c772847f.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
|
||||
41
assets/fonts/msyh.ttc.import
Normal file
@@ -0,0 +1,41 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://ce7ujbeobblyr"
|
||||
path="res://.godot/imported/msyh.ttc-1f7944f6d1cff8092894a3525ec5156c.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/fonts/msyh.ttc"
|
||||
dest_files=["res://.godot/imported/msyh.ttc-1f7944f6d1cff8092894a3525ec5156c.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
modulate_color_glyphs=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=false
|
||||
preload=[{
|
||||
"chars": "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+-=[]{}|;':\",./<>?`~一二三四五六七八九十百千万亿用户名密码登录注册验证码邮箱小镇鲸鱼欢迎来到开始你的之旅请输入不能为空获取发送忘记返回居民身份确认再次已被使用换个等待分钟后试稍后正在创建账户测试模式生成查看控制台网络连接失败系统维护中升级稍后再试频繁联系管理员禁用审核先邮箱后使用成功进入镇错误或过期未找到存在",
|
||||
"glyphs": [],
|
||||
"name": "Web预加载",
|
||||
"size": Vector2i(16, 0)
|
||||
}]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
40
assets/icon/icon144.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bwy5r7soxi76a"
|
||||
path="res://.godot/imported/icon144.png-ae9d1f30a88beaab449c2cad89283dd3.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/icon/icon144.png"
|
||||
dest_files=["res://.godot/imported/icon144.png-ae9d1f30a88beaab449c2cad89283dd3.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
|
||||
40
assets/icon/icon16.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bqg5e8qn1j74u"
|
||||
path="res://.godot/imported/icon16.png-3099ad8a609f90c382508b9c073ffd76.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/icon/icon16.png"
|
||||
dest_files=["res://.godot/imported/icon16.png-3099ad8a609f90c382508b9c073ffd76.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
|
||||
40
assets/icon/icon180.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://drpllpsjdiaex"
|
||||
path="res://.godot/imported/icon180.png-20a9d7b98bfb315dd470e3635f315a17.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/icon/icon180.png"
|
||||
dest_files=["res://.godot/imported/icon180.png-20a9d7b98bfb315dd470e3635f315a17.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
|
||||
40
assets/icon/icon32.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dt24j6p0cijqo"
|
||||
path="res://.godot/imported/icon32.png-9a0aceb23d191139c34540a188bf8c91.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/icon/icon32.png"
|
||||
dest_files=["res://.godot/imported/icon32.png-9a0aceb23d191139c34540a188bf8c91.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
|
||||
40
assets/icon/icon512.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dt817lem3dwee"
|
||||
path="res://.godot/imported/icon512.png-1c1c4b424489de87a542c89bec6eb15b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/icon/icon512.png"
|
||||
dest_files=["res://.godot/imported/icon512.png-1c1c4b424489de87a542c89bec6eb15b.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
|
||||
40
assets/icon/icon64.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ci42rd5qe6icl"
|
||||
path="res://.godot/imported/icon64.png-da8a1a20e3bf4dcf06c8ff6c558caaff.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/icon/icon64.png"
|
||||
dest_files=["res://.godot/imported/icon64.png-da8a1a20e3bf4dcf06c8ff6c558caaff.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
|
||||
40
assets/icon/image(1).png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cnw6e3wmy0ea4"
|
||||
path="res://.godot/imported/image(1).png-c89cc92103e50aaba40bf38c797be77f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/icon/image(1).png"
|
||||
dest_files=["res://.godot/imported/image(1).png-c89cc92103e50aaba40bf38c797be77f.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
|
||||
40
assets/icon/image.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c7v22i1hgo1x6"
|
||||
path="res://.godot/imported/image.png-3f16548595ba9fb08c5e50ef3251d148.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/icon/image.png"
|
||||
dest_files=["res://.godot/imported/image.png-3f16548595ba9fb08c5e50ef3251d148.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
|
||||
|
Before Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 179 KiB |
40
assets/sprites/environment/board.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c7jx40leuy6q1"
|
||||
path="res://.godot/imported/board.png-4f7a101e7a1b1cbdc8a75666c78e8907.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/board.png"
|
||||
dest_files=["res://.godot/imported/board.png-4f7a101e7a1b1cbdc8a75666c78e8907.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
|
||||
40
assets/sprites/environment/community.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://7j3n0nhg8atb"
|
||||
path="res://.godot/imported/community.png-a8c4bd53b7eaad8a751801ba0eb4ea69.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/community.png"
|
||||
dest_files=["res://.godot/imported/community.png-a8c4bd53b7eaad8a751801ba0eb4ea69.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
|
||||
40
assets/sprites/environment/community_512_512.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cle66our01dq1"
|
||||
path="res://.godot/imported/community_512_512.png-fa162180b6884ce89074ec9b8b445a11.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/community_512_512.png"
|
||||
dest_files=["res://.godot/imported/community_512_512.png-fa162180b6884ce89074ec9b8b445a11.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
|
||||
40
assets/sprites/environment/curb.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b2gci3tcylfiw"
|
||||
path="res://.godot/imported/curb.png-aea973bea0e48d7135256b05941024a3.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/curb.png"
|
||||
dest_files=["res://.godot/imported/curb.png-aea973bea0e48d7135256b05941024a3.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
|
||||
40
assets/sprites/environment/deck_256_111.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bxk7qx15ks23n"
|
||||
path="res://.godot/imported/deck_256_111.png-1f5516606f281e4ce47eda14a0f195f6.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/deck_256_111.png"
|
||||
dest_files=["res://.godot/imported/deck_256_111.png-1f5516606f281e4ce47eda14a0f195f6.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
|
||||
40
assets/sprites/environment/deck_256_93.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cuoondqo7wpvm"
|
||||
path="res://.godot/imported/deck_256_93.png-53cc7596920e943ad680f551cecde9c5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/deck_256_93.png"
|
||||
dest_files=["res://.godot/imported/deck_256_93.png-53cc7596920e943ad680f551cecde9c5.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
|
||||
40
assets/sprites/environment/deck_2784_1536.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dth4pwye1huv1"
|
||||
path="res://.godot/imported/deck_2784_1536.png-7209e3c01bcb29b96850c5bfe2118eb5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/deck_2784_1536.png"
|
||||
dest_files=["res://.godot/imported/deck_2784_1536.png-7209e3c01bcb29b96850c5bfe2118eb5.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
|
||||
40
assets/sprites/environment/deck_384_167.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d3w3fncsm32oi"
|
||||
path="res://.godot/imported/deck_384_167.png-f28a21a5574e4d3fa7c0565d6c292757.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/deck_384_167.png"
|
||||
dest_files=["res://.godot/imported/deck_384_167.png-f28a21a5574e4d3fa7c0565d6c292757.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
|
||||
40
assets/sprites/environment/deck_512_164.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://j0twhfkpj15i"
|
||||
path="res://.godot/imported/deck_512_164.png-c98703495d73d104671911f6dada9aca.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/deck_512_164.png"
|
||||
dest_files=["res://.godot/imported/deck_512_164.png-c98703495d73d104671911f6dada9aca.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
|
||||
40
assets/sprites/environment/deck_512_282.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://blre1srim52hs"
|
||||
path="res://.godot/imported/deck_512_282.png-ec2cdd543ebb499e3623cd89dff86aa4.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/deck_512_282.png"
|
||||
dest_files=["res://.godot/imported/deck_512_282.png-ec2cdd543ebb499e3623cd89dff86aa4.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
|
||||
40
assets/sprites/environment/deck_512_512.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://drdfggxi5ecw7"
|
||||
path="res://.godot/imported/deck_512_512.png-14cca0360b4e43a84ff23febdf688dce.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/deck_512_512.png"
|
||||
dest_files=["res://.godot/imported/deck_512_512.png-14cca0360b4e43a84ff23febdf688dce.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
|
||||
40
assets/sprites/environment/download_1767426187137.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://djmpsp6t8vbra"
|
||||
path="res://.godot/imported/download_1767426187137.png-a7252aa9f644c4f3ab14cefb1a59847c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/download_1767426187137.png"
|
||||
dest_files=["res://.godot/imported/download_1767426187137.png-a7252aa9f644c4f3ab14cefb1a59847c.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
|
||||
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ci5myym3wxvej"
|
||||
path="res://.godot/imported/e2f5aff78fae12f979d3456eca0896b4.jpg-09ffb25e15f901ba90adc883741736d3.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/e2f5aff78fae12f979d3456eca0896b4.jpg"
|
||||
dest_files=["res://.godot/imported/e2f5aff78fae12f979d3456eca0896b4.jpg-09ffb25e15f901ba90adc883741736d3.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
|
||||
40
assets/sprites/environment/floor_tile.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c3yr7cietnip3"
|
||||
path="res://.godot/imported/floor_tile.png-922ec9c726f71491a3ebe25e6696192d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/floor_tile.png"
|
||||
dest_files=["res://.godot/imported/floor_tile.png-922ec9c726f71491a3ebe25e6696192d.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
|
||||
40
assets/sprites/environment/fountain_256_192.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dujutnr03apoj"
|
||||
path="res://.godot/imported/fountain_256_192.png-6fb4e69b74642a426b29631ef7156f53.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/fountain_256_192.png"
|
||||
dest_files=["res://.godot/imported/fountain_256_192.png-6fb4e69b74642a426b29631ef7156f53.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
|
||||
40
assets/sprites/environment/grass_128_128.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://h1kqvkvshfxo"
|
||||
path="res://.godot/imported/grass_128_128.png-f99428f7721484fc94b70ea8f73a140d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/grass_128_128.png"
|
||||
dest_files=["res://.godot/imported/grass_128_128.png-f99428f7721484fc94b70ea8f73a140d.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
|
||||
40
assets/sprites/environment/grass_256_256.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dwlnclqw6lsa7"
|
||||
path="res://.godot/imported/grass_256_256.png-480baf97b2b792db085b32018ac813a5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/grass_256_256.png"
|
||||
dest_files=["res://.godot/imported/grass_256_256.png-480baf97b2b792db085b32018ac813a5.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
|
||||
40
assets/sprites/environment/ground.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ccqxsarxnnf4e"
|
||||
path="res://.godot/imported/ground.png-2205e043de9d3b8a38f01788dff375d3.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/ground.png"
|
||||
dest_files=["res://.godot/imported/ground.png-2205e043de9d3b8a38f01788dff375d3.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
|
||||
40
assets/sprites/environment/house_256_192.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dtev6yddbjtvp"
|
||||
path="res://.godot/imported/house_256_192.png-939b43001a6826dd2fb03b0e500d6b91.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/house_256_192.png"
|
||||
dest_files=["res://.godot/imported/house_256_192.png-939b43001a6826dd2fb03b0e500d6b91.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
|
||||
40
assets/sprites/environment/house_384_256.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bxmbnywn7pd35"
|
||||
path="res://.godot/imported/house_384_256.png-9c21ec19000d397cf04e3d4c46d9fd67.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/house_384_256.png"
|
||||
dest_files=["res://.godot/imported/house_384_256.png-9c21ec19000d397cf04e3d4c46d9fd67.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
|
||||
40
assets/sprites/environment/house_384_288.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://drl6vecqinsgw"
|
||||
path="res://.godot/imported/house_384_288.png-2c4bb2980ec70d9c801e9d8f5c9da5e2.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/house_384_288.png"
|
||||
dest_files=["res://.godot/imported/house_384_288.png-2c4bb2980ec70d9c801e9d8f5c9da5e2.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
|
||||
40
assets/sprites/environment/river.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c7v86fkrcb4go"
|
||||
path="res://.godot/imported/river.png-5a4acbf78dd4e08f27a3192f37afc708.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/river.png"
|
||||
dest_files=["res://.godot/imported/river.png-5a4acbf78dd4e08f27a3192f37afc708.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
|
||||
40
assets/sprites/environment/river2_256_256.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://df3klfat72qro"
|
||||
path="res://.godot/imported/river2_256_256.png-4b34411e3a9844aea328c2b5fdd9f6d7.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/river2_256_256.png"
|
||||
dest_files=["res://.godot/imported/river2_256_256.png-4b34411e3a9844aea328c2b5fdd9f6d7.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
|
||||
40
assets/sprites/environment/river2_512_512.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://5r75q24ww18f"
|
||||
path="res://.godot/imported/river2_512_512.png-af87f8da62bcadc69167d888dc2932d0.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/river2_512_512.png"
|
||||
dest_files=["res://.godot/imported/river2_512_512.png-af87f8da62bcadc69167d888dc2932d0.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
|
||||
40
assets/sprites/environment/river_256_256.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://devfvbybifga6"
|
||||
path="res://.godot/imported/river_256_256.png-9a57f752ac6003da70cffda69b91371a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/river_256_256.png"
|
||||
dest_files=["res://.godot/imported/river_256_256.png-9a57f752ac6003da70cffda69b91371a.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
|
||||
40
assets/sprites/environment/river_512_512.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b4wt8paqrevg2"
|
||||
path="res://.godot/imported/river_512_512.png-218f1dc6fae57e80762824a68b0c08f6.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/river_512_512.png"
|
||||
dest_files=["res://.godot/imported/river_512_512.png-218f1dc6fae57e80762824a68b0c08f6.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
|
||||
40
assets/sprites/environment/room_512_384.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bjcij2ncikeyw"
|
||||
path="res://.godot/imported/room_512_384.png-339d4ab4d8dc5972ef1c8a09d0380694.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/room_512_384.png"
|
||||
dest_files=["res://.godot/imported/room_512_384.png-339d4ab4d8dc5972ef1c8a09d0380694.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
|
||||
40
assets/sprites/environment/square.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://7o0xyqmqbvov"
|
||||
path="res://.godot/imported/square.png-f3b8edd32d9382a7b98d24fd60e1b771.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/square.png"
|
||||
dest_files=["res://.godot/imported/square.png-f3b8edd32d9382a7b98d24fd60e1b771.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
|
||||
40
assets/sprites/environment/square1.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dt33hewme0p1k"
|
||||
path="res://.godot/imported/square1.png-5d845f041b32e4a2880ddc03c7e210e2.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/square1.png"
|
||||
dest_files=["res://.godot/imported/square1.png-5d845f041b32e4a2880ddc03c7e210e2.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
|
||||
40
assets/sprites/environment/standard_brick.png.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://icto1uyw4hj1"
|
||||
path="res://.godot/imported/standard_brick.png.png-f806a78b5dfedf81aa2e413ced30aa6a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/standard_brick.png.png"
|
||||
dest_files=["res://.godot/imported/standard_brick.png.png-f806a78b5dfedf81aa2e413ced30aa6a.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
|
||||
40
assets/sprites/environment/standard_brick_128_128.jpg.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://baa5wkuyqouh6"
|
||||
path="res://.godot/imported/standard_brick_128_128.jpg-0dc76f792db60d64e5610aa75364c4ef.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/standard_brick_128_128.jpg"
|
||||
dest_files=["res://.godot/imported/standard_brick_128_128.jpg-0dc76f792db60d64e5610aa75364c4ef.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
|
||||
40
assets/sprites/environment/water.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://balpojbve2n4f"
|
||||
path="res://.godot/imported/water.png-28a245d0248e5e7513f6a266dcca901f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/water.png"
|
||||
dest_files=["res://.godot/imported/water.png-28a245d0248e5e7513f6a266dcca901f.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
|
||||
40
assets/sprites/environment/广场瓦片集.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ignbtjvnp5k7"
|
||||
path="res://.godot/imported/广场瓦片集.png-b224b40553b9f690e690f67a89e2b520.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/广场瓦片集.png"
|
||||
dest_files=["res://.godot/imported/广场瓦片集.png-b224b40553b9f690e690f67a89e2b520.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
|
||||
40
assets/sprites/environment/草地.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dvsb51jintro"
|
||||
path="res://.godot/imported/草地.png-2fa7f2346d7dc837788dd21e5693cec7.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/environment/草地.png"
|
||||
dest_files=["res://.godot/imported/草地.png-2fa7f2346d7dc837788dd21e5693cec7.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
|
||||
|
Before Width: | Height: | Size: 1000 KiB |
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 902 KiB |
40
assets/ui/auth/bg_auth_scene.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bx17oy8lvaca4"
|
||||
path="res://.godot/imported/bg_auth_scene.png-818065fcc20397e855c75507c1313623.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ui/auth/bg_auth_scene.png"
|
||||
dest_files=["res://.godot/imported/bg_auth_scene.png-818065fcc20397e855c75507c1313623.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
|
||||
40
assets/ui/auth/login_frame_smart_transparent.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://de4q4s1gxivtf"
|
||||
path="res://.godot/imported/login_frame_smart_transparent.png-e5d0fd05b4713ddd3beae8223f2abb80.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ui/auth/login_frame_smart_transparent.png"
|
||||
dest_files=["res://.godot/imported/login_frame_smart_transparent.png-e5d0fd05b4713ddd3beae8223f2abb80.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
|
||||
|
Before Width: | Height: | Size: 992 KiB |
|
Before Width: | Height: | Size: 690 KiB |
|
Before Width: | Height: | Size: 206 KiB |
|
Before Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 198 KiB |
|
Before Width: | Height: | Size: 276 B |
|
Before Width: | Height: | Size: 281 B |
|
Before Width: | Height: | Size: 3.6 KiB |
40
assets/ui/datawhale_logo.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://gr7vud1lee4m"
|
||||
path="res://.godot/imported/datawhale_logo.png-ddb5e2c04419eb84cfa8605bcbf64fbd.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ui/datawhale_logo.png"
|
||||
dest_files=["res://.godot/imported/datawhale_logo.png-ddb5e2c04419eb84cfa8605bcbf64fbd.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
|
||||