mirror of
https://github.com/wassname/phaser.git
synced 2026-08-16 11:25:21 +08:00
Removed all intances of Sprite.group from Group and replaced with the already existing parent property.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update, render: render });
|
||||
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render });
|
||||
|
||||
function preload() {
|
||||
|
||||
@@ -16,9 +16,9 @@ function create() {
|
||||
|
||||
sprite = game.add.sprite(0, 0, 'pic');
|
||||
|
||||
g = game.add.group();
|
||||
g = game.add.group(null, 'billy');
|
||||
|
||||
g.create(0, 0, 'pic');
|
||||
sprite2 = g.create(0, 0, 'pic');
|
||||
|
||||
g.y = 200;
|
||||
g.rotation = 0.1;
|
||||
@@ -47,4 +47,6 @@ function update() {
|
||||
|
||||
function render() {
|
||||
|
||||
game.debug.renderText(sprite.position.y, 32, 32);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user