API Docs for: 1.13.1
Show:

game.Pool Class

Extends game.Class
Defined in: src/engine/pool.js:11
Module: pool

Object pool.

Item Index

Methods

Methods

create

(
  • pool
)
Boolean

Create new pool.

Parameters:

  • pool String

    Name of the pool.

Returns:

Boolean:

Returns false, if pool already exists.

get

(
  • pool
)
Object

Get object from pool.

Parameters:

  • pool String

    Name of the pool.

Returns:

Object:

Returns false, if pool not found or empty.

put

(
  • pool
  • object
)
Boolean

Put object to pool.

Parameters:

  • pool String

    Name of the pool.

  • object Object

    Object to put to the pool.

Returns:

Boolean:

Returns false, if pool not found.