@rjfwhite/random-lib
Version:
Core engine for MML
36 lines • 996 B
TypeScript
import { AttachmentRule, Behavior } from "./types";
import "./index";
export declare class FlammableBehavior extends Behavior {
private fireSpreadRadius;
private fireSpreadChance;
private fireElement;
static getAttachmentRules(): AttachmentRule[];
onAttach(): void;
onDetach(): void;
/**
* Creates a simple fire visual using a large red box
*/
private createFireVisual;
/**
* Removes the fire visual effect
*/
private removeFireVisual;
/**
* Ignites this flammable element by setting the on-fire attribute
*/
ignite(): void;
/**
* Extinguishes this flammable element by removing the on-fire attribute
*/
extinguish(): void;
/**
* Checks if this element is currently on fire
*/
isOnFire(): boolean;
/**
* Attempts to spread fire to nearby flammable elements
*/
private spreadFire;
tick(deltaTime: number): void;
}
//# sourceMappingURL=FlammableBehavior.d.ts.map