WarriorJS Docs
  • Player
  • Maker
  • 社区
  • 中文
    • English
    • العربية
    • Català
    • Čeština
    • Deutsch
    • Ελληνικά
    • Español
    • Français
    • Italiano
    • Polskie
    • Русский
    • Српски језик (Ћирилица)
    • Svenska
    • Türkçe
    • 繁體中文
    • 帮助翻译
  • GitHub

›玩家 API

游戏

  • 概述
  • 目的
  • 游戏玩法
  • 视角
  • 得分
  • 史诗模式
  • Towers

概念

  • 单位
  • 勇士
  • 技能
  • 空格

玩家 API

  • 空间 API
  • 单元 API
  • 转变 API

提示&技巧

  • 一般
  • JavaScript
  • 人工智能
  • 命令行界面

命令行界面

  • Install
  • Options
Translate

转变 API

通过Player.js中的playTurn 方法,你可以创建一个回合的实例。 你在这个回合中可调用的方法取决于你当前战士的能力在哪个级别上。 请参阅配置文件目录中的README文件, 以查找该信息。

Here is an example extracted from the README of the second level in the "Baby Steps" tower:

### Abilities

#### Actions

- `warrior.attack()`
- `warrior.walk()`

#### Senses

- `warrior.feel()`

In this level, your warrior has the abilities "attack", "feel", and "walk", which means you can call these three methods on your turn: warrior.attack(), warrior.feel(), and warrior.walk().

Many abilities can be performed in the following directions: "forward", "backward", "left", and "right". You have to pass a string with the direction as the first argument, e.g. warrior.walk('backward').

← 单元 API一般提示 →
WarriorJS Docs
Docs
PlayerMaker
Community
SpectrumTwitterFollow WarriorJS on Twitter
More
DonateGitHubStar