> 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/slide-penguin.md).

# 滑行企鹅

企鹅滑行玩法，带有定时横扫动作，可根据与目标的距离改变减速和计分。

将企鹅滑向目标，并通过定时扫动影响它减速的速度。

部署说明：目前尚未部署。

* [在 Decentraland 上游玩](https://decentraland.org/jump?position=-140%2C101)

## 项目信息

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

[查看上游源代码](https://github.com/ToxSam/SlidePenguin)

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

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

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

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

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

## 探索代码

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

### 将扫动变为临时移动效果修正

`handleSwipe` 会为减速效果降低设置冷却时间，并记录该效果何时到期。 `penguinMovementSystem` 会在该时段结束后恢复基础减速度、更新速度，并根据帧时间推进变换。

**项目背景：** 请参考项目中的 `PenguinMovement` 和 `SwipeBox` 组件及调节常量，了解输入与运动之间的联系。

**源代码参考：**

* [`handleSwipe`](https://github.com/ToxSam/SlidePenguin/blob/19978bf4ca9e793ce87cd5637efc1abf3a3b686c/src/systems.ts#L519-L598)
* [`penguinMovementSystem`](https://github.com/ToxSam/SlidePenguin/blob/19978bf4ca9e793ce87cd5637efc1abf3a3b686c/src/systems.ts#L864-L913)

### 为物体落点与目标的接近程度评分

`calculateDistance2D` 和 `calculateScore` 会忽略高度，根据最大距离对水平距离进行归一化，并将其映射为四舍五入后的分数，最高不超过 `MAX_SCORE`.

**项目背景：** 这个小型模块是了解邻近度评分的一个实用起点；其输入为企鹅的最终位置和目标位置。

**源代码参考：**

* [`calculateDistance2D` 和 `calculateScore`](https://github.com/ToxSam/SlidePenguin/blob/19978bf4ca9e793ce87cd5637efc1abf3a3b686c/src/scoring.ts#L5-L39)


---

# 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/slide-penguin.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.
