> 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/goal-legends.md).

# 进球传奇

由服务器运行比赛、持久化排行榜、阶段驱动摄像机和同步球动画的多人点球大战。

![Goal Legends 预览](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-87e13f2e322f58c64eb7133149b291704e742ea7%2FgoalLegends-preview.webp?alt=media)

一款多人点球大战游戏。与另一名玩家或 GL-Bot 对决：选择左侧、中间或右侧来射门得分或扑救。每轮结束后都会播放电视转播风格的回放，观众也会实时做出反应。

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

## 项目信息

**维护者：** 社区 · carlosmu

[查看上游源代码](https://github.com/carlosmu/goal-legends-arena)

**许可证：** [Apache-2.0 声明](https://github.com/carlosmu/goal-legends-arena/blob/master/LICENCE)。重用前请查看上游条款；代码和资源可能适用不同条款。

{% hint style="warning" %}
**社区维护的代码——使用前请先审查**

此社区项目由 Decentraland Foundation 和 DAO 的 GitHub 组织之外的人员维护。其源代码和线上部署可能独立发生变化。

此项目被收录于本目录，并不代表它已通过安全审计或保证其安全性。运行或复用前，请审查代码、依赖项和安装脚本。

[报告目录相关问题](https://github.com/decentraland/docs/issues/new)。如怀疑存在漏洞，请遵循上游项目的安全政策。请勿在公开议题中包含漏洞利用细节或凭据。
{% endhint %}

## 主要功能

* **多人游戏服务器** 负责运行比赛
* **存储** 用于每日/历史 PvP/PvE 排行榜，以及每位玩家的国家旗帜。
* **场景** **表情动作**
* 与动画同步的球体道具，用于射门、扑救、进球和救球。
* **虚拟摄像机** 用于游戏视角，以及所有人都能看到的获胜者电影镜头。
* **AvatarShape** 会对每次进球和扑救做出反应的观众 NPC。
* **粒子效果** 用于烟花
* 一个带有灯光和 **`GltfNodeModifiers`** 的传送门，可带你前往另一个 World。

## 探索代码

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

### 随比赛阶段切换摄像机

`initGameplayCamera` 根据客户端比赛快照选择游戏、获胜者或标准摄像机。获胜者摄像机围绕一个枢轴旋转，而观众可以在比赛期间选择自由视角。

**项目背景：** 请结合以下内容阅读： `clientSnapshot`、 `GameState` 枚举，以及场景中命名的摄像机枢轴。

**源代码参考：**

* [`initGameplayCamera`](https://github.com/carlosmu/goal-legends-arena/blob/5d42bba8f10ac2c3103a4e5804541c693e8528b3/src/client/gameplayCamera.ts#L109-L165)

### 协调道具动画与游戏状态

`tickAnimationManager` 阶段变化时启动球体动画片段，根据射门方向选择进球/扑救动画，并在切换动画片段时短暂隐藏道具。此流程仅适用于机器人主罚者；真人主罚者会在表情动作中携带球。

**项目背景：** 它依赖场景中的球模型和已命名的动画片段。

**源代码参考：**

* [`tickAnimationManager`](https://github.com/carlosmu/goal-legends-arena/blob/5d42bba8f10ac2c3103a4e5804541c693e8528b3/src/client/animationManager.ts#L78-L114)


---

# 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/goal-legends.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.
