mirror of
https://github.com/photonstorm/phaser
synced 2024-11-30 16:39:34 +00:00
Containers flag
This commit is contained in:
parent
1802f8b30b
commit
5612336d47
2 changed files with 12 additions and 2 deletions
|
@ -8,6 +8,8 @@
|
|||
var Container = require('./Container');
|
||||
var GameObjectFactory = require('../GameObjectFactory');
|
||||
|
||||
var hasWarned = false;
|
||||
|
||||
/**
|
||||
* Creates a new Container Game Object and adds it to the Scene.
|
||||
*
|
||||
|
@ -24,5 +26,11 @@ var GameObjectFactory = require('../GameObjectFactory');
|
|||
*/
|
||||
GameObjectFactory.register('container', function (x, y, children)
|
||||
{
|
||||
if (!hasWarned)
|
||||
{
|
||||
console.warn('Containers are experimental and should not be used in production');
|
||||
hasWarned = true;
|
||||
}
|
||||
|
||||
return this.displayList.add(new Container(this.scene, x, y, children));
|
||||
});
|
||||
|
|
|
@ -410,7 +410,7 @@ var InputManager = new Class({
|
|||
|
||||
if (gameObject.parentContainer)
|
||||
{
|
||||
gameObject.getWorldTransformMatrix(matrix, camera);
|
||||
gameObject.getWorldTransformMatrix(matrix);
|
||||
|
||||
TransformXY(px, py, matrix.tx, matrix.ty, matrix.rotation, matrix.scaleX, matrix.scaleY, point);
|
||||
}
|
||||
|
@ -428,6 +428,7 @@ var InputManager = new Class({
|
|||
return output;
|
||||
},
|
||||
|
||||
/*
|
||||
debugHitTest: function (x, y, gameObject, camera, output)
|
||||
{
|
||||
if (output === undefined) { output = this._tempHitTest; }
|
||||
|
@ -448,7 +449,7 @@ var InputManager = new Class({
|
|||
|
||||
gameObject.getWorldTransformMatrix(matrix);
|
||||
|
||||
matrix.invert();
|
||||
// matrix.invert();
|
||||
matrix.transformPoint(px, py, point);
|
||||
|
||||
// var tt = new TransformMatrix();
|
||||
|
@ -465,6 +466,7 @@ var InputManager = new Class({
|
|||
|
||||
return [ matrix, point, this.pointWithinHitArea(gameObject, point.x, point.y) ];
|
||||
},
|
||||
*/
|
||||
|
||||
/**
|
||||
* x/y MUST be translated before being passed to this function,
|
||||
|
|
Loading…
Reference in a new issue