mirror of
https://github.com/wassname/phaser.git
synced 2026-07-01 16:50:43 +08:00
Group nearly done. Sprite.anchor appears to be broken though, must fix.
This commit is contained in:
@@ -26,7 +26,7 @@ Phaser.GameObjectFactory.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Create a new Sprite with specific position and sprite sheet key.
|
||||
* Create a new Sprite with specific position and sprite sheet key that will automatically be added as a child of the given parent.
|
||||
*
|
||||
* @param x {number} X position of the new sprite.
|
||||
* @param y {number} Y position of the new sprite.
|
||||
@@ -55,6 +55,12 @@ Phaser.GameObjectFactory.prototype = {
|
||||
|
||||
},
|
||||
|
||||
group: function (parent, name) {
|
||||
|
||||
return new Phaser.Group(this.game, parent, name);
|
||||
|
||||
},
|
||||
|
||||
audio: function (key, volume, loop) {
|
||||
|
||||
return this.game.sound.add(key, volume, loop);
|
||||
|
||||
Reference in New Issue
Block a user