Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IWorldRendererEvents

Hierarchy

  • IWorldRendererEvents

Index

Methods

canSeeCreature

  • canSeeCreature(creature: Creature, tile: ITile): boolean | undefined
  • Called when calculating creatures in the viewport

    Parameters

    • creature: Creature

      The creature object

    • tile: ITile

      The tile the creature is on

    Returns boolean | undefined

    False if the player should not see the creature or undefined to use the default logic

canSeeNPC

  • canSeeNPC(npc: NPC, tile: ITile): boolean | undefined
  • Called when calculating npcs in the viewport

    Parameters

    • npc: NPC

      The npc object

    • tile: ITile

      The tile the npc is on

    Returns boolean | undefined

    False if the player should not see the npc or undefined to use the default logic

getCreatureSpriteBatchLayer

  • Called when rendering creatures in the viewport

    Parameters

    Returns SpriteBatchLayer | undefined

    The batch layer the creature should render in or undefined to use the default logic

getMaxSpritesForLayer

  • Called when initializing each sprite batch layer.

    Parameters

    • maxSprites: number

      The default number of sprites that can be rendered at one time on this layer

    • layer: SpriteBatchLayer

      The SpriteBatchLayer that is being initialized

    Returns number

    The number of sprites that can be rendered at one time on this layer

getPlayerSpriteBatchLayer

  • Called when rendering the player in the viewport

    Parameters

    Returns SpriteBatchLayer | undefined

    The batch layer the player should render in or undefined to use the default logic

updateZoom

  • updateZoom(zoom: number, oldZoom: number): any
  • Called when the zoom level is changed.

    Parameters

    • zoom: number
    • oldZoom: number

    Returns any

Generated using TypeDoc