mirror of
https://github.com/wassname/phaser.git
synced 2026-06-30 16:40:20 +08:00
Lots of doc updates!
This commit is contained in:
+142
-25
@@ -54,6 +54,18 @@
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Bullet.html">Bullet</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Button.html">Button</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Cache.html">Cache</a>
|
||||
</li>
|
||||
@@ -126,6 +138,10 @@
|
||||
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
@@ -138,6 +154,14 @@
|
||||
<a href="Phaser.Game.html">Game</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Group.html">Group</a>
|
||||
</li>
|
||||
@@ -194,6 +218,14 @@
|
||||
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Physics.html">Physics</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Plugin.html">Plugin</a>
|
||||
</li>
|
||||
@@ -222,6 +254,10 @@
|
||||
<a href="Phaser.Rectangle.html">Rectangle</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
||||
</li>
|
||||
@@ -238,6 +274,10 @@
|
||||
<a href="Phaser.SoundManager.html">SoundManager</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Sprite.html">Sprite</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Stage.html">Stage</a>
|
||||
</li>
|
||||
@@ -254,6 +294,14 @@
|
||||
<a href="Phaser.StateManager.html">StateManager</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
@@ -296,10 +344,82 @@
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li>
|
||||
<a href="global.html#audio">audio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#bitmapText">bitmapText</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#bottom">bottom</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#button">button</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#child">child</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#emitter">emitter</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#existing.">existing.</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#graphics">graphics</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#group">group</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#renderTexture">renderTexture</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#right">right</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#sprite">sprite</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#text">text</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#tilemap">tilemap</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#tilemaplayer">tilemaplayer</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#tileset">tileset</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#tileSprite">tileSprite</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#tween">tween</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -629,10 +749,13 @@ Phaser.InputHandler.prototype = {
|
||||
|
||||
if (this.enabled)
|
||||
{
|
||||
this.enabled = false;
|
||||
|
||||
this.game.input.interactiveItems.remove(this);
|
||||
|
||||
this.stop();
|
||||
// Null everything
|
||||
|
||||
this.sprite = null;
|
||||
// etc
|
||||
}
|
||||
},
|
||||
|
||||
@@ -804,24 +927,15 @@ Phaser.InputHandler.prototype = {
|
||||
{
|
||||
this.sprite.getLocalUnmodifiedPosition(this._tempPoint, pointer.x, pointer.y);
|
||||
|
||||
// Check against bounds first (move these to private vars)
|
||||
var x1 = -(this.sprite.texture.frame.width) * this.sprite.anchor.x;
|
||||
var y1;
|
||||
|
||||
if (this._tempPoint.x > x1 && this._tempPoint.x < x1 + this.sprite.texture.frame.width)
|
||||
if (this._tempPoint.x >= 0 && this._tempPoint.x <= this.sprite.currentFrame.width && this._tempPoint.y >= 0 && this._tempPoint.y <= this.sprite.currentFrame.height)
|
||||
{
|
||||
y1 = -(this.sprite.texture.frame.height) * this.sprite.anchor.y;
|
||||
|
||||
if (this._tempPoint.y > y1 && this._tempPoint.y < y1 + this.sprite.texture.frame.height)
|
||||
if (this.pixelPerfect)
|
||||
{
|
||||
if (this.pixelPerfect)
|
||||
{
|
||||
return this.checkPixel(this._tempPoint.x, this._tempPoint.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return this.checkPixel(this._tempPoint.x, this._tempPoint.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -839,16 +953,16 @@ Phaser.InputHandler.prototype = {
|
||||
*/
|
||||
checkPixel: function (x, y) {
|
||||
|
||||
x += (this.sprite.texture.frame.width * this.sprite.anchor.x);
|
||||
y += (this.sprite.texture.frame.height * this.sprite.anchor.y);
|
||||
|
||||
// Grab a pixel from our image into the hitCanvas and then test it
|
||||
|
||||
if (this.sprite.texture.baseTexture.source)
|
||||
{
|
||||
this.game.input.hitContext.clearRect(0, 0, 1, 1);
|
||||
|
||||
// This will fail if the image is part of a texture atlas - need to modify the x/y values here
|
||||
|
||||
x += this.sprite.texture.frame.x;
|
||||
y += this.sprite.texture.frame.y;
|
||||
|
||||
this.game.input.hitContext.drawImage(this.sprite.texture.baseTexture.source, x, y, 1, 1, 0, 0, 1, 1);
|
||||
|
||||
var rgb = this.game.input.hitContext.getImageData(0, 0, 1, 1);
|
||||
@@ -938,7 +1052,10 @@ Phaser.InputHandler.prototype = {
|
||||
this.game.stage.canvas.style.cursor = "default";
|
||||
}
|
||||
|
||||
this.sprite.events.onInputOut.dispatch(this.sprite, pointer);
|
||||
if (this.sprite && this.sprite.events)
|
||||
{
|
||||
this.sprite.events.onInputOut.dispatch(this.sprite, pointer);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -1393,8 +1510,8 @@ Phaser.InputHandler.prototype = {
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a>
|
||||
on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user