Options
All
  • Public
  • Public/Protected
  • All
Menu

Object used to register entity AI prototypes

Hierarchy

  • EntityAIPrototype

Implemented by

Index

Properties

data?: object

Object containing the state of the AI type

params?: object

Default parameters set

Methods

  • attackedBy(attacker: number): void
  • Called when entity is attacked by player

    Parameters

    • attacker: number

    Returns void

  • death(attacker: number): void
  • Called when entity is dead

    Parameters

    • attacker: number

      entity that damaged this entity, or -1 if damage source is not an entity

    Returns void

  • execute(): void
  • executionEnded(): void
  • executionPaused(): void
  • executionResumed(): void
  • executionStarted(extra?: any): void
  • getDefaultName(): string
  • getDefaultPriority(): number
  • hurtBy(attacker: number, damage: number): void
  • Called when entity gets hurt

    Parameters

    • attacker: number

      entity that damaged this entity, or -1 if damage source is not an entity

    • damage: number

      amount of damage

    Returns void

  • projectileHit(projectile: number): void
  • Called when a projectile hits the entity

    Parameters

    • projectile: number

      projectile entity id

    Returns void

Generated using TypeDoc