Class StrategyContainerInternal

Container to house convenience strategy methods

Hierarchy

  • StrategyContainer

Constructors

Properties

camera: Camera

Methods

  • Creates and adds the ElasticToActorStrategy on the current camera If cameraElasticity < cameraFriction < 1.0, the behavior will be a dampened spring that will slowly end at the target without bouncing If cameraFriction < cameraElasticity < 1.0, the behavior will be an oscillating spring that will over correct and bounce around the target

    Parameters

    • actor: Actor

      Target actor to elastically follow

    • cameraElasticity: number

      [0 - 1.0] The higher the elasticity the more force that will drive the camera towards the target

    • cameraFriction: number

      [0 - 1.0] The higher the friction the more that the camera will resist motion towards the target

    Returns void

  • Creates and adds the RadiusAroundActorStrategy on the current camera

    Parameters

    • actor: Actor

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

    • radius: number

      Number of pixels away before the camera will follow

    Returns void