Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Follow

Hierarchy

  • Follow

Implements

Index

Constructors

constructor

  • new Follow(actor: Actor, actorToFollow: Actor, followDistance?: number): Follow
  • Parameters

    • actor: Actor
    • actorToFollow: Actor
    • Optional followDistance: number

    Returns Follow

Properties

Private _actor

_actor: Actor

Private _actorToFollow

_actorToFollow: Actor

Private _current

_current: Vector

Private _dir

_dir: Vector

Private _distanceBetween

_distanceBetween: number

Private _end

_end: Vector

Private _maximumDistance

_maximumDistance: number

Private _speed

_speed: number

Private _started

_started: boolean = false

Private _stopped

_stopped: boolean = false

x

x: number

y

y: number

Methods

isComplete

  • isComplete(actor: Actor): boolean
  • Parameters

    Returns boolean

reset

  • reset(): void
  • Returns void

stop

  • stop(): void
  • Returns void

update

  • update(delta: number): void
  • Parameters

    • delta: number

    Returns void