phaser/v2/resources/docgen/output/Phaser.GameObjectCreator.json

1 line
21 KiB
JSON
Raw Normal View History

{"class":{"name":"Phaser.GameObjectCreator","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"A reference to the currently running game.","optional":false,"default":null}],"help":"The Game Object Creator is a quick way to create all of the different sorts of core objects that Phaser uses, but not add them to the game world.\\nUse the GameObjectFactory to create and add the objects into the world."},"consts":[],"methods":{"public":[{"name":"audio","static":false,"returns":{"types":["Phaser.Sound"],"help":"The newly created text object."},"help":"Creates a new Sound object.","line":122,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"The Game.cache key of the sound that this object will use.","optional":false,"default":null},{"name":"volume","type":["number"],"help":"The volume at which the sound will be played.","optional":true,"default":"1"},{"name":"loop","type":["boolean"],"help":"Whether or not the sound will loop.","optional":true,"default":"false"},{"name":"connect","type":["boolean"],"help":"Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio.","optional":true,"default":"true"}],"inherited":false,"inheritedFrom":""},{"name":"audioSprite","static":false,"returns":{"types":["Phaser.AudioSprite"],"help":"The newly created AudioSprite object."},"help":"Creates a new AudioSprite object.","line":135,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"The Game.cache key of the sound that this object will use.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"bitmapData","static":false,"returns":{"types":["Phaser.BitmapData"],"help":"The newly created BitmapData object."},"help":"A BitmapData object which can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.","line":360,"public":true,"protected":false,"private":false,"parameters":[{"name":"width","type":["number"],"help":"The width of the BitmapData in pixels.","optional":true,"default":"256"},{"name":"height","type":["number"],"help":"The height of the BitmapData in pixels.","optional":true,"default":"256"},{"name":"key","type":["string"],"help":"Asset key for the BitmapData when stored in the Cache (see addToCache parameter).","optional":true,"default":"''"},{"name":"addToCache","type":["boolean"],"help":"Should this BitmapData be added to the Game.Cache? If so you can retrieve it with Cache.getBitmapData(key)","optional":true,"default":"false"}],"inherited":false,"inheritedFrom":""},{"name":"bitmapText","static":false,"returns":{"types":["Phaser.BitmapText"],"help":"The newly created bitmapText object."},"help":"Create a new BitmapText object.","line":298,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"X position of the new bitmapText object.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the new bitmapText object.","optional":false,"default":null},{"name":"font","type":["string"],"help":"The key of the BitmapText font as stored in Game.Cache.","optional":false,"default":null},{"name":"text","type":["string"],"help":"The actual text that will be rendered. Can be set later via BitmapText.text.","optional":true,"default":null},{"name":"size","type":["number"],"help":"The size the font will be rendered in, in pixels.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"button","static":false,"returns":{"types":["Phaser.Button"],"help":"The newly created button object."},"help":"Creates a new Button object.","line":224,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":" X position of the new button object.","optional":true,"default":null},{"name":"y","type":["number"],"help":" Y position of the new button object.","optional":true,"default":null},{"name":"key","type":["string"],"help":" The image key as defined in