DownloadSlots

Limits how many downloads run at once. Each AssetLoader has one.

Properties

  • max (integer) — Most downloads at once
  • active (integer) — Downloads running now

Constructor

new DownloadSlots(): DownloadSlots

Instance Methods

tryTake(): boolean

Takes a slot if one is free.

Returns

  • boolean — true if a slot was taken

give(): void

Gives back a slot taken with tryTake().

Returns

  • void