Skip to content

Update index.md #3184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions versions/3.8/zh/getting-started/first-game-2d/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,16 @@ export class GameManager extends Component {
- 由于我们的角色可以选择跳 1 个方块或者 2 个方块,和某个戴红帽子穿背带裤家伙比起来太弱鸡了,因此坑最多不应该连续超过 2 个,也就意味着如果前面 1 个地块是坑,那么接下来的地块必须是方块

接下来为 `GameManager` 添加几个方法:
- 引用
```ts
import { _decorator, Component, Prefab, CCInteger, instantiate, Node } from 'cc';
import { BLOCK_SIZE, PlayerController } from './PlayerController';

const { ccclass, property } = _decorator;

...
...
```
- 生成地图的方法:

```ts
Expand Down