Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StatusEffectRenderer

Hierarchy

  • StatusEffectRenderer

Index

Constructors

constructor

Properties

Protected layers

layers: Map<StatusEffectRenderLayer, PriorityMap<(number | ((render: IRenderFunction) => any))[]>> = new Map<StatusEffectRenderLayer, PriorityMap<SpriteLineOrRenderLayerImpl[]>>()

Readonly priority

priority: number

Protected tints

tints: IRGB[] = []

Methods

addLayer

  • Adds a new render layer.

    Parameters

    • renderLayer: StatusEffectRenderLayer

      The render layer this should render on (body, clothes, or hair).

    • spriteLine: number

      The line of the default sprite this status effect should render from.

    • Optional priority: undefined | number

      The priority of this layer relative to other layers in the same render layer.

    Returns this

  • Adds a new render layer.

    Parameters

    • renderLayer: StatusEffectRenderLayer

      The render layer this should render on (body, clothes, or hair).

    • renderFunction: IRenderLayerImplementation

      A function that takes a function to be used for rendering any sprites over the player.

    • Optional priority: undefined | number

      The priority of this layer relative to other layers in the same render layer.

    Returns this

addTint

  • addTint(...tints: IRGB[]): this
  • Adds new tints.

    Parameters

    • Rest ...tints: IRGB[]

    Returns this

getTints

  • getTints(): IRGB[]
  • Return a list of tints that the body will render with. These are all merged with each other and any other tints from status effects currently on the body. Every tint has an even % except for the base body tint, which is 70%.

    Returns IRGB[]

hasLayer

  • hasLayer(): boolean
  • Returns whether there are any registered render layers.

    Returns boolean

render

  • Renders any images for the given render layer, using the given render function.

    Parameters

    Returns void

Protected renderLayer

Optional shouldRenderBaseLayer

  • Return false to cancel rendering of the given layer.

    Parameters

    Returns boolean

Generated using TypeDoc