> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/creator/content-creator-zh/jiao-cheng-yu-shi-li/published-games/dead-surge.md).

# 僵尸潮

具有武器进阶、复用奖励文本以及敌人在其他僵尸和障碍物周围本地寻路的僵尸生存游戏。

![《Dead Surge》预览](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-5446b11a043e078db26d258897a3c9242b0dcde5%2FdeadSurge-preview.webp?alt=media)

包含战斗和武器成长系统的僵尸生存游戏。

* [在 Decentraland 上游玩](https://decentraland.org/jump?realm=deadsurge.dcl.eth)

## 项目信息

**维护者：** Decentraland DAO

[查看源代码](https://github.com/dcl-regenesislabs/dead-surge)

**许可证：** 此目录中未标明许可证。重用前，请查阅上游代码库并咨询维护者，确认适用条款。

## 探索代码

这些链接指向特定的源代码快照，因此随着上游持续开发，这些说明仍然有用。它们是学习参考资料，并非安全评估。

### 复用实体来显示浮动奖励文本

`spawnZcRewardTextAtPosition` 及其对象池初始化器会循环使用一组固定的文本实体。 `rewardTextSystem` 会让它们上升、面向摄像机并逐渐淡出，然后将它们隐藏以供复用。

**项目背景：** 阅读场景中的 `RewardTextComponent` 以及用于更新游戏时间的这些函数，以了解它们如何跟踪生命周期。

**源代码参考：**

* [`spawnZcRewardTextAtPosition` 及其对象池初始化器](https://github.com/dcl-regenesislabs/dead-surge/blob/4e967ba0590e0cdf7d6550ebbf56ea3b246a36dd/src/zombie.ts#L592-L640)
* [`rewardTextSystem`](https://github.com/dcl-regenesislabs/dead-surge/blob/4e967ba0590e0cdf7d6550ebbf56ea3b246a36dd/src/zombie.ts#L815-L850)

### 引导敌人相互避让，并绕过简单障碍物

`getZombieSeparationDirection` 会综合计算来自附近僵尸的排斥力。 `resolveZombieMovePosition` 会针对圆形砖块障碍物，依次尝试期望方向、备用方向以及沿单个坐标轴移动。

**项目背景：** 这展示了局部引导行为；具体效果取决于场景中的移动条目、障碍物位置和半径常量。

**源代码参考：**

* [`getZombieSeparationDirection`](https://github.com/dcl-regenesislabs/dead-surge/blob/4e967ba0590e0cdf7d6550ebbf56ea3b246a36dd/src/zombie.ts#L868-L896)
* [`resolveZombieMovePosition`](https://github.com/dcl-regenesislabs/dead-surge/blob/4e967ba0590e0cdf7d6550ebbf56ea3b246a36dd/src/zombie.ts#L898-L939)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decentraland.org/creator/content-creator-zh/jiao-cheng-yu-shi-li/published-games/dead-surge.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
