Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StrategyContainer

Container to house convenience strategy methods

internal

Hierarchy

  • StrategyContainer

Index

Constructors

constructor

Properties

camera

camera: Camera

Methods

elasticToActor

  • elasticToActor(actor: Actor, cameraElasticity: number, cameraFriction: number): void
  • 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
    • cameraElasticity: number

      The higher the elasticity the more force that will drive the camera towards the target

    • cameraFriction: number

      The higher the friction the more that the camera will resist motion towards the target

    Returns void

limitCameraBounds

lockToActor

  • lockToActor(actor: Actor): void

lockToActorAxis

  • lockToActorAxis(actor: Actor, axis: Axis): void

radiusAroundActor

  • radiusAroundActor(actor: Actor, radius: number): void