clik-engine API
    Preparing search index...

    Class Interactable

    Makes an entity interactive — handles hover, click, and interaction zones. Useful for NPCs, items, doors, switches.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    enabled: boolean = true
    entity: Entity

    Methods

    • Set up proximity-based interaction. Call checkInteraction(player) each frame — fires the callback when player is in range and presses interact.

      Parameters

      • callback: () => void
      • range: number = 50

      Returns this