Options
All
  • Public
  • Public/Protected
  • All
Menu

Class used to create new entity AI types

Hierarchy

  • EntityAIClass

Implements

Index

Constructors

Properties

data: object

Object containing the state of the AI type

entity?: number

Id of the entity that uses this AI type instance or null if it is the pattern

isInstance: boolean

If set to true, it is an instance of AI type, else the pattern (pattern should not be modified directly, AI controller calls instantiate to create instances of AI type)

TODO: add link to AI controller type

params: object

All the parameters of the AI instance

parent: any

TODO: determine type

Methods

  • aiEntityChanged(entity: number): void
  • changeSelfPriority(priority: number): void
  • Changes own priority in parent's controller

    Parameters

    • priority: number

    Returns void

  • disableAI(name: string): void
  • Disables any AI by its name in the controller

    Parameters

    • name: string

      AI name to be disabled

    Returns void

  • enableAI(name: string, priority: number, extra: any): void
  • Enables any AI by its name in the controller

    Parameters

    • name: string

      AI name to be enables

    • priority: number

      priority to be set to the enabled AI

    • extra: any

      some extra data passed to

    Returns void

  • finishExecution(): void
  • getPriority(name: string): number
  • Gets any AI priority from the current controller by AI name

    Parameters

    • name: string

      AI name

    Returns number

  • removeExecutionTimer(): void
  • Resets execution timer so that AI is executed with no time limits

    Returns void

  • setExecutionTimer(timer: number): void
  • Sets execution timer time in ticks. AI will be executed specified number of ticks

    Parameters

    • timer: number

      execution time in ticks

    Returns void

  • setParams(params: object): void
  • setPriority(name: string, priority: number): void
  • Sets any AI priority by its name in the controller

    Parameters

    • name: string

      AI name to change priority

    • priority: number

      priority to be set to the AI

    Returns void

Generated using TypeDoc