GameObjectFactory

Class: Phaser.GameObjectFactory

Constructor

new GameObjectFactory(game)

The GameObjectFactory is a quick way to create many common game objects
using game.add.

Created objects are automatically added to the appropriate Manager, World, or manually specified parent Group.

Parameters
Name Type Description
game Phaser.Game

A reference to the currently running game.

Source code: 登录查看完整内容