springroll.CombinedCallback Class

Module: Core

CombinedCallback is a utility class that creates a function to be passed to multiple asynchronous functions as a callback, and will call your callback on the last time it is called.

Methods

create

(
  • call
  • [callCount=2]
)
Function
static

Defined in create:17

Creates a callback function for use.

Parameters:

  • call Function

    The callback to call when everything is complete.

  • [callCount=2] Int optional

    The number of times this function should expect to be called.

Returns:

Function:

The callback to pass to your asynchronous actions. For reuse, this function has a reset() function.