jetlag2d
    Preparing search index...

    Class DebugToggle

    DebugToggle is a lightweight system for letting the player press a key to show/hide hitbox/debug-outline rendering at run time.

    In reality, this isn't useful enough to be an official part of JetLag, but it is convenient for the tutorials, so we're keeping it.

    Index
    • Wire up a key to toggle the rendering of hitboxes on the fly. This only works if hitBoxes is true in the game's Config object.

      Parameters

      • cfg: { key?: KeyCodes } = {}
        • Optionalkey?: KeyCodes

          The key that toggles debug rendering (default: b)

      Returns void