# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project Overview 这是一个 Cocos Creator 3.8.8 项目,用于开发小游戏/可玩广告。 ## Project Structure ``` assets/ ├── main.ts # 主入口脚本 ├── main.scene # 主场景 ├── PageLoading.ts # 页面加载组件 ├── PageLoading.prefab # 预制体 ├── scripts/ │ └── utils/ │ └── BackgroundScaler.ts # 背景缩放工具组件 └── resources/ └── images/ # 图片资源 ``` ## Development Commands 此项目使用 Cocos Creator 编辑器进行开发: - **打开项目**: 使用 Cocos Creator 3.8.8 打开此目录 - **运行预览**: 在 Cocos Creator 编辑器中点击 "Play" 按钮 - **构建**: 使用编辑器菜单 `Project > Build` 或快捷键 `Cmd+B` ## TypeScript Coding 遵循 Cocos Creator 3.x 组件系统架构: - 使用 `@ccclass` 装饰器声明组件 - 继承 `cc.Component` 基类 - 生命周期方法: `onLoad` -> `start` -> `update` -> `onDestroy` - 使用 `cc.` 命名空间访问引擎 API(如 `cc.view`, `cc.Node`, `cc.Component` 等)