Interface WanderLikeAIPrototype

Object used to register entity AI prototypes.

interface WanderLikeAIPrototype {
    angular_speed?: number;
    data?: object;
    params?: object;
    speed?: number;
    attackedBy?(attacker: number): void;
    death?(attacker: number): void;
    execute?(): void;
    executionEnded?(): void;
    executionPaused?(): void;
    executionResumed?(): void;
    executionStarted?(extra?: any): void;
    getDefaultName?(): string;
    getDefaultPriority?(): number;
    hurtBy?(attacker: number, damage: number): void;
    projectileHit?(projectile: number): void;
}

Hierarchy (view full)

Methods

  • Called when entity is dead.

    Parameters

    • attacker: number

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

    Returns 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

Properties

angular_speed?: number

Entity speed when turning.

data?: object

Object containing the state of the AI type.

params?: object

Default parameters set.

speed?: number

Entity movement speed when AI is executed.

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.