Skip to main content

RadiusAroundActorStrategy

Interface that describes a custom camera strategy for tracking targets

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • Parameters

    • target: Actor

      Target actor to follow when it is "radius" pixels away

    • radius: number

      Number of pixels away before the camera will follow

    Returns RadiusAroundActorStrategy

Properties

publicradius

radius: number

Number of pixels away before the camera will follow

publictarget

target: Actor

Target actor to follow when it is "radius" pixels away

Methods

publicaction

  • Camera strategies perform an action to calculate a new focus returned out of the strategy


    Parameters

    • target: Actor

      The target object to apply this camera strategy (if any)

    • cam: Camera

      The current camera implementation in excalibur running the game

    • _eng: Engine<any>

      The current engine running the game

    • elapsed: number

      The elapsed time in milliseconds since the last frame

    Returns Vector

Page Options