Phaser API Documentation

isSizeBetween([min], [max])


This function determines whether the number of participants in the current game context is between a given minimum and maximum, inclusive. If one of the bounds is null only the other bound will be checked against. It will always return the original result for the first call made in a context in a given game play session. Subsequent calls, regardless of arguments, will return the answer to the original query until a context change occurs and the query result is reset.


name type arguments description
min integer <optional>

The minimum bound of the context size query.

max integer <optional>

The maximum bound of the context size query.


The Context Size Response object in the format: {answer: boolean, minSize: number?, maxSize: number?}.

  • object
Since: 3.13.0