> 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/the-fortune-teller.md).

# 占卜师

社交占卜，带有明确的对话状态转换和基于支点的电影镜头装置。

![占卜师预览](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-fe7aae71bf370a70ccf513e108b57501167b91b3%2FDecentraland_n9oGHbJPnR.webp?alt=media)

一种社交角色扮演体验，玩家可以接受占卜，也可以为朋友占卜。

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

## 项目信息

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

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

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

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

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

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

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

## 探索代码

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

### 将占卜流程表示为明确的状态转换

占卜状态机列出了从选择类别和牌组到揭晓结果的所有允许步骤。 `tryTransition` 会检查下一步、更新会话，并通知状态进入监听器。

**项目背景：** 结合会话类型和操作处理程序阅读这些内容，了解如何组织多步骤交互。

**源代码参考：**

* [占卜状态机](https://github.com/carlosmu/circus_fortune_teller/blob/f8db0c5630a03208d328a96737224e1293df60c7/src/fortuneFsm/machine.ts#L6-L60)

### 围绕场景对象构建摄像机装置

`ensureHostPivotRig` 和 `startHostCinematicCamera` 将虚拟摄像机挂接到桌子下方的枢轴上，根据玩家所在的一侧选择起始和结束角度，然后激活摄像机。

**项目背景：** 该摄像机装置依赖于本模块中的桌子实体、配置值和更新系统；这些部分说明了如何根据场景背景来构建交互画面。

**源代码参考：**

* [`ensureHostPivotRig` 和 `startHostCinematicCamera`](https://github.com/carlosmu/circus_fortune_teller/blob/f8db0c5630a03208d328a96737224e1293df60c7/src/cinematicCamera.ts#L141-L197)


---

# 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/the-fortune-teller.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.
