clik-engine API
    Preparing search index...

    Class Destructible

    Makes an entity destructible with health, damage stages, and callbacks. Lighter than the full Health + Hurtbox pipeline — for environmental objects.

    Usage:

    entity.addComponent('destructible', new Destructible({
    maxHealth: 100,
    stages: [
    { threshold: 0.5, callback: () => showCracks() },
    { threshold: 0.25, callback: () => showHeavyDamage() },
    ],
    onDestroy: () => spawnDebris(),
    }));

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    enabled: boolean = true
    entity: Entity

    Accessors

    Methods