WarriorJS Docs
  • Игрок
  • Разработчик
  • Сообщество
  • Русский
    • English
    • العربية
    • Català
    • Čeština
    • Deutsch
    • Ελληνικά
    • Español
    • Français
    • Italiano
    • Polskie
    • Српски језик (Ћирилица)
    • Svenska
    • Türkçe
    • 中文
    • 繁體中文
    • Помочь с переводом
  • GitHub

›API игрока

Игра

  • Обзор
  • Объект
  • Игровой процесс
  • Перспектива
  • Система баллов
  • Эпический режим
  • Towers

Основы

  • Существа
  • Воин
  • Способности
  • Разделы

API игрока

  • API Областей
  • Unit API
  • API Хода

Советы и Подсказки

  • Основныe
  • JavaScript
  • Искусственный Интеллект
  • CLI

CLI

  • Install
  • Options
Translate

Unit API

You can call getUnit() on a space to retrieve the unit located there (but keep in mind that not all spaces have units on them):

const unit = space.getUnit();

You can call methods on a unit to know more about it.

Методы Класса

Здесь представлены различные методы, которыми вы можете пользоваться:

unit.isBound()

Determines if the unit is bound.

Returns

(boolean): Whether this unit is bound or not.

unit.isEnemy():

Determines if the unit is an enemy.

Returns

(boolean): Whether this is an enemy unit or not.

← API ОбластейAPI Хода →
  • Методы Класса
    • unit.isBound()
    • unit.isEnemy():
WarriorJS Docs
Docs
PlayerMaker
Community
SpectrumTwitterFollow WarriorJS on Twitter
More
DonateGitHubStar