调整布局、新增导航栏,调整页面跳转逻辑
This commit is contained in:
@@ -39,11 +39,13 @@ assets/
|
||||
## Key Components
|
||||
|
||||
### AI Chat System
|
||||
|
||||
- **ChatAIService.ts**: Handles Google Gemini API integration for chat functionality
|
||||
- **ChatPanel.ts**: Main chat interface implementation
|
||||
- **index.ts**: Contains system prompts and character definitions
|
||||
|
||||
### Platform SDKs
|
||||
|
||||
- **SDKManager.ts**: Manages platform-specific SDK initialization
|
||||
- **wxSDK.ts**: WeChat Mini Game SDK integration
|
||||
- **bdSDK.ts**: Baidu SDK integration
|
||||
@@ -51,6 +53,7 @@ assets/
|
||||
- **webSDK.ts**: Web platform SDK
|
||||
|
||||
### Game Flow
|
||||
|
||||
- **GameEntry.ts**: Game initialization and configuration
|
||||
- **MainScene.ts**: Main menu scene
|
||||
- **GameScene.ts**: Core game scene
|
||||
@@ -61,30 +64,37 @@ assets/
|
||||
Since this is a Cocos Creator project, development is primarily done through the Cocos Creator IDE. Common tasks:
|
||||
|
||||
### Build & Run
|
||||
|
||||
- Open project in Cocos Creator 3.8.4
|
||||
- Use Creator's built-in preview: Menu → Project → Preview
|
||||
- Build for platforms: Menu → Project → Build
|
||||
|
||||
### TypeScript Compilation
|
||||
|
||||
TypeScript compilation is handled automatically by Cocos Creator. Manual compilation isn't typically needed.
|
||||
|
||||
## Important Considerations
|
||||
|
||||
### API Keys
|
||||
|
||||
The project contains API keys in the code (Google Gemini API). These should be moved to environment variables or a secure configuration file.
|
||||
|
||||
### Character System
|
||||
|
||||
The game uses configurable character profiles defined in `index.ts` with different personality settings (Role_1, Role_2, Role_3).
|
||||
|
||||
### Multi-Platform Support
|
||||
|
||||
The codebase includes platform-specific code branches. When modifying core functionality, ensure compatibility across all supported platforms (Web, WeChat, Baidu, Kuaishou).
|
||||
|
||||
### Asset Management
|
||||
|
||||
- Assets are organized in bundles for dynamic loading
|
||||
- Resource management is handled through ResManager
|
||||
- Audio assets are managed separately through AudioManager
|
||||
|
||||
### UI System
|
||||
|
||||
- Uses Cocos Creator's UI system with custom components
|
||||
- Base view class: `li_BaseView.ts`
|
||||
- View navigation managed by ViewManager
|
||||
@@ -94,4 +104,8 @@ The codebase includes platform-specific code branches. When modifying core funct
|
||||
- TypeScript with non-strict mode (`"strict": false` in tsconfig)
|
||||
- Component-based architecture following Cocos Creator patterns
|
||||
- Singleton pattern for managers (e.g., `SDKManager.I`, `PlayerDataManager.I`)
|
||||
- Event system using `li_EventManager` for decoupled communication
|
||||
- Event system using `li_EventManager` for decoupled communication
|
||||
|
||||
## Plan Description
|
||||
|
||||
- when user using plan mode create a plan, describe this plan in chinese.
|
||||
|
||||
Reference in New Issue
Block a user