Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EntityAIPrototype

Object used to register entity AI prototypes

Hierarchy

  • EntityAIPrototype

Implemented by

Index

Properties

Optional data

data: object

Object containing the state of the AI type

Optional params

params: object

Default parameters set

Methods

Optional attackedBy

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

    Parameters

    • attacker: number

    Returns void

Optional death

  • 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

Optional execute

  • execute(): void

Optional executionEnded

  • executionEnded(): void

Optional executionPaused

  • executionPaused(): void

Optional executionResumed

  • executionResumed(): void

Optional executionStarted

  • executionStarted(extra?: any): void

Optional getDefaultName

  • getDefaultName(): string

Optional getDefaultPriority

  • getDefaultPriority(): number

Optional hurtBy

  • 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

Optional projectileHit

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

    Parameters

    • projectile: number

      projectile entity id

    Returns void

Generated using TypeDoc