mirror of
https://github.com/wassname/phaser.git
synced 2026-07-10 00:30:50 +08:00
Updated Sprite to use the new smaller, leaner code. Farewell insane cache objects and multiple point processing!
This commit is contained in:
@@ -119,6 +119,7 @@ Phaser.Image.prototype.preUpdate = function() {
|
||||
|
||||
if (!this.exists || !this.parent.exists)
|
||||
{
|
||||
this.renderOrderID = -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -363,9 +364,7 @@ Phaser.Image.prototype.destroy = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Resets the Sprite. This places the Sprite at the given x/y world coordinates and then
|
||||
* sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values.
|
||||
* If the Sprite has a physics body that too is reset.
|
||||
* Resets the Sprite. This places the Sprite at the given x/y world coordinates and then sets alive, exists, visible and renderable all to true.
|
||||
*
|
||||
* @method Phaser.Image#reset
|
||||
* @memberof Phaser.Image
|
||||
@@ -382,7 +381,6 @@ Phaser.Image.prototype.reset = function(x, y) {
|
||||
this.exists = true;
|
||||
this.visible = true;
|
||||
this.renderable = true;
|
||||
this._outOfBoundsFired = false;
|
||||
|
||||
return this;
|
||||
|
||||
|
||||
+249
-658
File diff suppressed because it is too large
Load Diff
@@ -499,14 +499,6 @@ Phaser.InputHandler.prototype = {
|
||||
|
||||
// Need to pass it a temp point, in case we need it again for the pixel check
|
||||
if (this.game.input.hitTest(this.sprite, pointer, this._tempPoint))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
this.sprite.getLocalUnmodifiedPosition(this._tempPoint, pointer.x, pointer.y);
|
||||
|
||||
if (this._tempPoint.x >= 0 && this._tempPoint.x <= this.sprite.currentFrame.width && this._tempPoint.y >= 0 && this._tempPoint.y <= this.sprite.currentFrame.height)
|
||||
{
|
||||
if (this.pixelPerfect)
|
||||
{
|
||||
@@ -517,7 +509,6 @@ Phaser.InputHandler.prototype = {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user