API Docs for: 1.13.1
Show:

game.Pool Class

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

Object pool.

Item Index

Methods

create

(
  • pool
)
Boolean

Defined in engine/pool.js:17

Create new pool.

Parameters:

  • pool String

    Name of the pool.

Returns:

Boolean:

Returns false, if pool already exists.

extend

(
  • prop
)
game.Class

Inherited from game.Class: engine/core.js:757

Extend class.

Parameters:

  • prop Object

Returns:

get

(
  • pool
)
Object

Defined in engine/pool.js:31

Get object from pool.

Parameters:

  • pool String

    Name of the pool.

Returns:

Object:

Returns false, if pool not found or empty.

init

(
  • arguments
)

Inherited from game.Class: engine/core.js:811

This method is called, when you create new instance of the class.

Parameters:

  • arguments Array

inject

(
  • prop
)

Inherited from game.Class: engine/core.js:825

Inject class.

Parameters:

  • prop Object

put

(
  • pool
  • object
)
Boolean

Defined in engine/pool.js:42

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.

staticInit

(
  • arguments
)

Inherited from game.Class: engine/core.js:795

This method is called before init.

Parameters:

  • arguments Array