Skip to content

UnderAttack beta ​

Class of @v12-engine/client

ts
export declare class UnderAttack

Tracks attacks on the player's things: the alert to give, how often, and the last one

Members ​

constructor ​

ts
constructor(
    mine: (entity: EntityView) => boolean, 
    onScreen: (x: number, z: number) => boolean, 
    timing?: {
        seconds?: number;
        cells?: number;
    });

Constructs a new instance of the UnderAttack class

damaged ​

ts
damaged(entity: EntityView, now?: number): Alert | undefined;

An entity was hit: the alert to give, if any

last ​

ts
last?: Alert;

The last alert given, for the key that takes the view there