mwg API
    Preparing search index...

    Class Overworld

    import { Overworld } from '@datamoc/mw_games/world';

    declare const world: import('@datamoc/mw_games/world').World<unknown>;

    const overworld = new Overworld();
    overworld.add({ id: 'cave', x: 12, y: 4, leadsTo: 'caveLevel1', spawn: 'entrance' });

    const location = overworld.get('cave');
    if (location) world.enter(location.leadsTo, location.spawn);
    Index
    • the location at these exact coordinates, if any - for "the player stepped onto it"

      Parameters

      • x: number
      • y: number

      Returns Location | undefined