Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FrameStats

Implementation of a frame's stats. Meant to have values copied via FrameStats.reset, avoid creating instances of this every frame.

Hierarchy

  • FrameStats

Implements

Index

Properties

Private _delta

_delta: number = 0

Private _fps

_fps: number = 0

Private _id

_id: number = 0

Private _physicsStats

_physicsStats: PhysicsStats = new PhysicsStats()

Accessors

actors

  • Gets the frame's actor statistics

    Returns IFrameActorStats

delta

  • get delta(): number
  • set delta(value: number): void
  • Gets the frame's delta (time since last frame)

    Returns number

  • Sets the frame's delta (time since last frame). Internal use only.

    internal

    Parameters

    • value: number

    Returns void

duration

fps

  • get fps(): number
  • set fps(value: number): void
  • Gets the frame's frames-per-second (FPS)

    Returns number

  • Sets the frame's frames-per-second (FPS). Internal use only.

    internal

    Parameters

    • value: number

    Returns void

id

  • get id(): number
  • set id(value: number): void
  • Gets the frame's id

    Returns number

  • Sets the frame's id

    Parameters

    • value: number

    Returns void

physics

  • Gets the frame's physics statistics

    Returns PhysicsStats

Methods

clone

  • Provides a clone of this instance.

    Returns FrameStats

reset

  • Zero out values or clone other IFrameStat stats. Allows instance reuse.

    Parameters

    Returns void

Object literals

Private _actorStats

_actorStats: object

alive

alive: number = 0

killed

killed: number = 0

ui

ui: number = 0

remaining

  • get remaining(): number
  • Returns number

total

  • get total(): any
  • Returns any

Private _durationStats

_durationStats: object

draw

draw: number = 0

update

update: number = 0

total

  • get total(): any
  • Returns any