mirror of
https://github.com/photonstorm/phaser
synced 2024-11-11 07:34:43 +00:00
8290 lines
No EOL
114 KiB
HTML
8290 lines
No EOL
114 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Phaser Class: InputHandler</title>
|
|
|
|
<!--[if lt IE 9]>
|
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
<![endif]-->
|
|
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
|
|
|
|
|
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container-fluid">
|
|
<div class="navbar navbar-fixed-top navbar-inverse">
|
|
<div class="navbar-inner">
|
|
<a class="brand" href="index.html">Phaser</a>
|
|
<ul class="nav">
|
|
|
|
<li class="dropdown">
|
|
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
|
|
class="caret"></b></a>
|
|
|
|
<ul class="dropdown-menu ">
|
|
|
|
<li class="class-depth-0">
|
|
<a href="Phaser.html">Phaser</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown">
|
|
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
|
class="caret"></b></a>
|
|
|
|
<ul class="dropdown-menu ">
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Animation.html">Animation</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.ArrayList.html">ArrayList</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.BitmapData.html">BitmapData</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.BitmapText.html">BitmapText</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Button.html">Button</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Cache.html">Cache</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Camera.html">Camera</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Canvas.html">Canvas</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Circle.html">Circle</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Color.html">Color</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Device.html">Device</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Easing.html">Easing</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Easing.Back.html">Back</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Easing.Bounce.html">Bounce</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Easing.Circular.html">Circular</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Easing.Cubic.html">Cubic</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Easing.Elastic.html">Elastic</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Easing.Exponential.html">Exponential</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Easing.Linear.html">Linear</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Easing.Quartic.html">Quartic</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Easing.Quintic.html">Quintic</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Ellipse.html">Ellipse</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Events.html">Events</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Filter.html">Filter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Frame.html">Frame</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.FrameData.html">FrameData</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Game.html">Game</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Gamepad.html">Gamepad</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Graphics.html">Graphics</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Group.html">Group</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Image.html">Image</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Input.html">Input</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.InputHandler.html">InputHandler</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Key.html">Key</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Keyboard.html">Keyboard</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Line.html">Line</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.LinkedList.html">LinkedList</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Loader.html">Loader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Math.html">Math</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Mouse.html">Mouse</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.MSPointer.html">MSPointer</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Net.html">Net</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Particle.html">Particle</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Particles.html">Particles</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Physics.html">Physics</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Physics.P2.html">P2</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Plugin.html">Plugin</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.PluginManager.html">PluginManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Point.html">Point</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Pointer.html">Pointer</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Polygon.html">Polygon</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.QuadTree.html">QuadTree</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Rectangle.html">Rectangle</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.RetroFont.html">RetroFont</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Signal.html">Signal</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.SinglePad.html">SinglePad</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Sound.html">Sound</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.SoundManager.html">SoundManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Sprite.html">Sprite</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Stage.html">Stage</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.State.html">State</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.StateManager.html">StateManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Text.html">Text</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Tile.html">Tile</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Tilemap.html">Tilemap</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Tileset.html">Tileset</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.TileSprite.html">TileSprite</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Time.html">Time</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Timer.html">Timer</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Touch.html">Touch</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Tween.html">Tween</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.TweenManager.html">TweenManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Utils.html">Utils</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Utils.Debug.html">Debug</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.World.html">World</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row-fluid">
|
|
|
|
|
|
<div class="span8">
|
|
|
|
<div id="main">
|
|
|
|
|
|
|
|
<h1 class="page-title">Class: InputHandler</h1>
|
|
<section>
|
|
|
|
<header>
|
|
<h2>
|
|
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
|
|
|
|
InputHandler
|
|
</h2>
|
|
|
|
<div class="class-description"><p>Phaser.InputHandler</p></div>
|
|
|
|
</header>
|
|
|
|
<article>
|
|
<div class="container-overview">
|
|
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="InputHandler"><span class="type-signature"></span>new InputHandler<span class="signature">(sprite)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>The Input Handler is bound to a specific Sprite and is responsible for managing all Input events on that Sprite.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>sprite</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The Sprite object to which this Input Handler belongs.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-13">line 13</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="subsection-title">Members</h3>
|
|
|
|
<dl>
|
|
|
|
<dt>
|
|
<h4 class="name" id="allowHorizontalDrag"><span class="type-signature"></span>allowHorizontalDrag<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>allowHorizontalDrag</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>Controls if the Sprite is allowed to be dragged horizontally.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>true</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-62">line 62</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="allowVerticalDrag"><span class="type-signature"></span>allowVerticalDrag<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>allowVerticalDrag</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>Controls if the Sprite is allowed to be dragged vertically.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>true</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-68">line 68</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="boundsRect"><span class="type-signature"></span>boundsRect<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>boundsRect</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>A region of the game world within which the sprite is restricted during drag.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>null</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-152">line 152</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="boundsSprite"><span class="type-signature"></span>boundsSprite<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>boundsSprite</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>A Sprite the bounds of which this sprite is restricted during drag.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>null</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-158">line 158</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="bringToTop"><span class="type-signature"></span>bringToTop<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>bringToTop</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>If true when this Sprite is clicked or dragged it will automatically be bought to the top of the Group it is within.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-74">line 74</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="consumePointerEvent"><span class="type-signature"></span>consumePointerEvent<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p>If this object is set to consume the pointer event then it will stop all propogation from this object on.
|
|
For example if you had a stack of 6 sprites with the same priority IDs and one consumed the event, none of the others would receive it.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>consumePointerEvent</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-166">line 166</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="draggable"><span class="type-signature"></span>draggable<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>draggable</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>Is this sprite allowed to be dragged by the mouse? true = yes, false = no</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-146">line 146</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="enabled"><span class="type-signature"></span>enabled<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>enabled</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>If enabled the Input Handler will process input requests and monitor pointer activity.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-29">line 29</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="game"><span class="type-signature"></span>game<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>game</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>A reference to the currently running game.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-23">line 23</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="isDragged"><span class="type-signature"></span>isDragged<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>isDragged</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>true if the Sprite is being currently dragged.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-56">line 56</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="pixelPerfectAlpha"><span class="type-signature"></span>pixelPerfectAlpha<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pixelPerfectAlpha</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The alpha tolerance threshold. If the alpha value of the pixel matches or is above this value, it's considered a hit.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>255</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-140">line 140</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="pixelPerfectClick"><span class="type-signature"></span>pixelPerfectClick<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p>Set to true to use pixel perfect hit detection when checking if the pointer is over this Sprite when it's clicked or touched.
|
|
The x/y coordinates of the pointer are tested against the image in combination with the InputHandler.pixelPerfectAlpha value.
|
|
Warning: This is expensive so only enable if you really need it.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pixelPerfectClick</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>Use a pixel perfect check when testing for clicks or touches on the Sprite.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-134">line 134</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="pixelPerfectOver"><span class="type-signature"></span>pixelPerfectOver<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p>Set to true to use pixel perfect hit detection when checking if the pointer is over this Sprite.
|
|
The x/y coordinates of the pointer are tested against the image in combination with the InputHandler.pixelPerfectAlpha value.
|
|
Warning: This is expensive, especially on mobile (where it's not even needed!) so only enable if required. Also see the less-expensive InputHandler.pixelPerfectClick.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pixelPerfectOver</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>Use a pixel perfect check when testing for pointer over.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-125">line 125</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="priorityID"><span class="type-signature"></span>priorityID<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p>The priorityID is used to determine which game objects should get priority when input events occur. For example if you have
|
|
several Sprites that overlap, by default the one at the top of the display list is given priority for input events. You can
|
|
stop this from happening by controlling the priorityID value. The higher the value, the more important they are considered to the Input events.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>priorityID</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>0</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-38">line 38</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="snapOffset"><span class="type-signature"></span>snapOffset<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>snapOffset</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Point.html">Phaser.Point</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>A Point object that contains by how far the Sprite snap is offset.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>null</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-80">line 80</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="snapOffsetX"><span class="type-signature"></span>snapOffsetX<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>snapOffsetX</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>This defines the top-left X coordinate of the snap grid.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>0</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-110">line 110</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="snapOffsetY"><span class="type-signature"></span>snapOffsetY<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>snapOffsetY</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>This defines the top-left Y coordinate of the snap grid..</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>0</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-116">line 116</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="snapOnDrag"><span class="type-signature"></span>snapOnDrag<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>snapOnDrag</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>When the Sprite is dragged this controls if the center of the Sprite will snap to the pointer on drag or not.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-86">line 86</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="snapOnRelease"><span class="type-signature"></span>snapOnRelease<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>snapOnRelease</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>When the Sprite is dragged this controls if the Sprite will be snapped on release.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-92">line 92</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="snapX"><span class="type-signature"></span>snapX<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>snapX</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>When a Sprite has snapping enabled this holds the width of the snap grid.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>0</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-98">line 98</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="snapY"><span class="type-signature"></span>snapY<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>snapY</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>When a Sprite has snapping enabled this holds the height of the snap grid.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>0</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-104">line 104</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="sprite"><span class="type-signature"></span>sprite<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>sprite</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The Sprite object to which this Input Handler belongs.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-18">line 18</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="useHandCursor"><span class="type-signature"></span>useHandCursor<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
<h5 class="subsection-title">Properties:</h5>
|
|
|
|
<dl>
|
|
|
|
<table class="props table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>useHandCursor</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>On a desktop browser you can set the 'hand' cursor to appear when moving over the Sprite.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-44">line 44</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h3 class="subsection-title">Methods</h3>
|
|
|
|
<dl>
|
|
|
|
<dt>
|
|
<h4 class="name" id="checkBoundsRect"><span class="type-signature"></span>checkBoundsRect<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Bounds Rect check for the sprite drag</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1310">line 1310</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="checkBoundsSprite"><span class="type-signature"></span>checkBoundsSprite<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Parent Sprite Bounds check for the sprite drag.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1359">line 1359</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="checkPixel"><span class="type-signature"></span>checkPixel<span class="signature">(x, y, <span class="optional">pointer</span>)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Runs a pixel perfect check against the given x/y coordinates of the Sprite this InputHandler is bound to.
|
|
It compares the alpha value of the pixel and if >= InputHandler.pixelPerfectAlpha it returns true.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
<th>Argument</th>
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>x</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The x coordinate to check.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>y</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The y coordinate to check.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The pointer to get the x/y coordinate from if not passed as the first two parameters.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-672">line 672</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
<div class="param-desc">
|
|
<p>true if there is the alpha of the pixel is >= InputHandler.pixelPerfectAlpha</p>
|
|
</div>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="checkPointerDown"><span class="type-signature"></span>checkPointerDown<span class="signature">(pointer)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Checks if the given pointer is over this Sprite and can click it.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-612">line 612</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
<div class="param-desc">
|
|
<p>True if the pointer is down, otherwise false.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="checkPointerOver"><span class="type-signature"></span>checkPointerOver<span class="signature">(pointer)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Checks if the given pointer is over this Sprite.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-642">line 642</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="destroy"><span class="type-signature"></span>destroy<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Clean up memory.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-367">line 367</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="disableDrag"><span class="type-signature"></span>disableDrag<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Stops this sprite from being able to be dragged. If it is currently the target of an active drag it will be stopped immediately. Also disables any set callbacks.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1151">line 1151</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="disableSnap"><span class="type-signature"></span>disableSnap<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Stops the sprite from snapping to a grid during drag or release.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1299">line 1299</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="downDuration"><span class="type-signature"></span>downDuration<span class="signature">(pointer)</span><span class="type-signature"> → {number}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1092">line 1092</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
<div class="param-desc">
|
|
<p>The number of milliseconds the pointer has been pressed down on the Sprite, or -1 if not over.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="enableDrag"><span class="type-signature"></span>enableDrag<span class="signature">(<span class="optional">lockCenter</span>, <span class="optional">bringToTop</span>, <span class="optional">pixelPerfect</span>, <span class="optional">alphaThreshold</span>, <span class="optional">boundsRect</span>, <span class="optional">boundsSprite</span>)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Make this Sprite draggable by the mouse. You can also optionally set mouseStartDragCallback and mouseStopDragCallback</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
<th>Argument</th>
|
|
|
|
|
|
|
|
<th>Default</th>
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>lockCenter</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
false
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>If false the Sprite will drag from where you click it minus the dragOffset. If true it will center itself to the tip of the mouse pointer.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>bringToTop</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
false
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>If true the Sprite will be bought to the top of the rendering list in its current Group.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pixelPerfect</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
false
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>If true it will use a pixel perfect test to see if you clicked the Sprite. False uses the bounding box.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>alphaThreshold</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
255
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>If using pixel perfect collision this specifies the alpha level from 0 to 255 above which a collision is processed.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>boundsRect</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
null
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>If you want to restrict the drag of this sprite to a specific Rectangle, pass the Phaser.Rectangle here, otherwise it's free to drag anywhere.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>boundsSprite</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
null
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>If you want to restrict the drag of this sprite to within the bounding box of another sprite, pass it here.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1111">line 1111</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="enableSnap"><span class="type-signature"></span>enableSnap<span class="signature">(snapX, snapY, <span class="optional">onDrag</span>, <span class="optional">onRelease</span>, <span class="optional">snapOffsetX</span>, <span class="optional">snapOffsetX</span>)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Make this Sprite snap to the given grid either during drag or when it's released.
|
|
For example 16x16 as the snapX and snapY would make the sprite snap to every 16 pixels.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
<th>Argument</th>
|
|
|
|
|
|
|
|
<th>Default</th>
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>snapX</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>The width of the grid cell to snap to.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>snapY</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>The height of the grid cell to snap to.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>onDrag</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
true
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>If true the sprite will snap to the grid while being dragged.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>onRelease</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
false
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>If true the sprite will snap to the grid when released.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>snapOffsetX</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
0
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>Used to offset the top-left starting point of the snap grid.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>snapOffsetX</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
0
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>Used to offset the top-left starting point of the snap grid.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1272">line 1272</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="justOut"><span class="type-signature"></span>justOut<span class="signature">(pointer, delay)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Returns true if the pointer has left the Sprite within the specified delay time (defaults to 500ms, half a second)</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>delay</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The time below which the pointer is considered as just out.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1025">line 1025</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="justOver"><span class="type-signature"></span>justOver<span class="signature">(pointer, delay)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Returns true if the pointer has entered the Sprite within the specified delay time (defaults to 500ms, half a second)</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>delay</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The time below which the pointer is considered as just over.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1009">line 1009</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="justPressed"><span class="type-signature"></span>justPressed<span class="signature">(pointer, delay)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Returns true if the pointer has touched or clicked on the Sprite within the specified delay time (defaults to 500ms, half a second)</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>delay</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The time below which the pointer is considered as just over.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1041">line 1041</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="justReleased"><span class="type-signature"></span>justReleased<span class="signature">(pointer, delay)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Returns true if the pointer was touching this Sprite, but has been released within the specified delay time (defaults to 500ms, half a second)</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>delay</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The time below which the pointer is considered as just out.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1057">line 1057</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="overDuration"><span class="type-signature"></span>overDuration<span class="signature">(pointer)</span><span class="type-signature"> → {number}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1073">line 1073</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
<div class="param-desc">
|
|
<p>The number of milliseconds the pointer has been over the Sprite, or -1 if not over.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="pointerDown"><span class="type-signature"></span>pointerDown<span class="signature">(pointer)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-454">line 454</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="pointerDragged"><span class="type-signature"></span>pointerDragged<span class="signature">(pointer)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Is this sprite being dragged by the mouse or not?</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-598">line 598</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
<div class="param-desc">
|
|
<p>True if the pointer is dragging an object, otherwise false.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="pointerOut"><span class="type-signature"></span>pointerOut<span class="signature">(<span class="optional">index</span>)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Is the Pointer outside of this Sprite?</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
<th>Argument</th>
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>index</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The ID number of a Pointer to check. If you don't provide a number it will check all Pointers.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-540">line 540</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
<div class="param-desc">
|
|
<p>True if the given pointer (if a index was given, or any pointer if not) is out of this object.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="pointerOver"><span class="type-signature"></span>pointerOver<span class="signature">(<span class="optional">index</span>)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Is the Pointer over this Sprite?</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
<th>Argument</th>
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>index</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The ID number of a Pointer to check. If you don't provide a number it will check all Pointers.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-510">line 510</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
<div class="param-desc">
|
|
<p>True if the given pointer (if a index was given, or any pointer if not) is over this object.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="pointerTimeDown"><span class="type-signature"></span>pointerTimeDown<span class="signature">(pointer)</span><span class="type-signature"> → {number}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>A timestamp representing when the Pointer first touched the touchscreen.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-482">line 482</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="pointerTimeOut"><span class="type-signature"></span>pointerTimeOut<span class="signature">(pointer)</span><span class="type-signature"> → {number}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>A timestamp representing when the Pointer left the touchscreen.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-584">line 584</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="pointerTimeOver"><span class="type-signature"></span>pointerTimeOver<span class="signature">(pointer)</span><span class="type-signature"> → {number}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>A timestamp representing when the Pointer first touched the touchscreen.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-570">line 570</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="pointerTimeUp"><span class="type-signature"></span>pointerTimeUp<span class="signature">(pointer)</span><span class="type-signature"> → {number}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>A timestamp representing when the Pointer left the touchscreen.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-496">line 496</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="pointerUp"><span class="type-signature"></span>pointerUp<span class="signature">(pointer)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-468">line 468</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="pointerX"><span class="type-signature"></span>pointerX<span class="signature">(pointer)</span><span class="type-signature"> → {number}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>The x coordinate of the Input pointer, relative to the top-left of the parent Sprite.
|
|
This value is only set when the pointer is over this Sprite.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-424">line 424</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
<div class="param-desc">
|
|
<p>The x coordinate of the Input pointer.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="pointerY"><span class="type-signature"></span>pointerY<span class="signature">(pointer)</span><span class="type-signature"> → {number}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>The y coordinate of the Input pointer, relative to the top-left of the parent Sprite
|
|
This value is only set when the pointer is over this Sprite.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-439">line 439</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
<div class="param-desc">
|
|
<p>The y coordinate of the Input pointer.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="reset"><span class="type-signature"></span>reset<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Resets the Input Handler and disables it.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-319">line 319</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="setDragLock"><span class="type-signature"></span>setDragLock<span class="signature">(<span class="optional">allowHorizontal</span>, <span class="optional">allowVertical</span>)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Restricts this sprite to drag movement only on the given axis. Note: If both are set to false the sprite will never move!</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
<th>Argument</th>
|
|
|
|
|
|
|
|
<th>Default</th>
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>allowHorizontal</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
true
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>To enable the sprite to be dragged horizontally set to true, otherwise false.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>allowVertical</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
true
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>To enable the sprite to be dragged vertically set to true, otherwise false.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1256">line 1256</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="start"><span class="type-signature"></span>start<span class="signature">(priority, useHandCursor)</span><span class="type-signature"> → {<a href="Phaser.Sprite.html">Phaser.Sprite</a>}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Starts the Input Handler running. This is called automatically when you enable input on a Sprite, or can be called directly if you need to set a specific priority.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>priority</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>Higher priority sprites take click priority over low-priority sprites when they are stacked on-top of each other.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>useHandCursor</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>If true the Sprite will show the hand cursor on mouse-over (doesn't apply to mobile browsers)</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-212">line 212</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
<div class="param-desc">
|
|
<p>The Sprite object to which the Input Handler is bound.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="startDrag"><span class="type-signature"></span>startDrag<span class="signature">(pointer)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Called by Pointer when drag starts on this Sprite. Should not usually be called directly.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1171">line 1171</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="stop"><span class="type-signature"></span>stop<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Stops the Input Handler from running.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-347">line 347</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="stopDrag"><span class="type-signature"></span>stopDrag<span class="signature">(pointer)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Called by Pointer when drag is stopped on this Sprite. Should not usually be called directly.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-1221">line 1221</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="update"><span class="type-signature"><protected> </span>update<span class="signature">(pointer)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Update.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-724">line 724</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="updateDrag"><span class="type-signature"></span>updateDrag<span class="signature">(pointer)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Updates the Pointer drag on this Sprite.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>pointer</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Pointer.html">Phaser.Pointer</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-934">line 934</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="validForInput"><span class="type-signature"><protected> </span>validForInput<span class="signature">(highestID, highestRenderID)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>Checks if the object this InputHandler is bound to is valid for consideration in the Pointer move event.
|
|
This is called by Phaser.Pointer and shouldn't typically be called directly.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>highestID</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The highest ID currently processed by the Pointer.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>highestRenderID</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The highest Render Order ID currently processed by the Pointer.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
<a href="InputHandler.js.html">input/InputHandler.js</a>, <a href="InputHandler.js.html#sunlight-1-line-393">line 393</a>
|
|
</li></ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
<div class="param-desc">
|
|
<p>True if the object this InputHandler is bound to should be considered as valid for input detection.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|
|
<footer>
|
|
|
|
|
|
<span class="copyright">
|
|
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
|
</span>
|
|
<br />
|
|
|
|
<span class="jsdoc-message">
|
|
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
|
on Tue May 20 2014 10:05:58 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
|
</span>
|
|
</footer>
|
|
</div>
|
|
|
|
|
|
<div class="span3">
|
|
<div id="toc"></div>
|
|
</div>
|
|
|
|
<br clear="both">
|
|
</div>
|
|
|
|
</div>
|
|
<script src="scripts/sunlight.js"></script>
|
|
<script src="scripts/sunlight.javascript.js"></script>
|
|
<script src="scripts/sunlight-plugin.doclinks.js"></script>
|
|
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
|
|
<script src="scripts/sunlight-plugin.menu.js"></script>
|
|
<script src="scripts/jquery.min.js"></script>
|
|
<script src="scripts/jquery.scrollTo.js"></script>
|
|
<script src="scripts/jquery.localScroll.js"></script>
|
|
<script src="scripts/bootstrap-dropdown.js"></script>
|
|
<script src="scripts/toc.js"></script>
|
|
|
|
|
|
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
|
|
|
|
<script>
|
|
$( function () {
|
|
$( "#toc" ).toc( {
|
|
anchorName : function(i, heading, prefix) {
|
|
return $(heading).attr("id") || ( prefix + i );
|
|
},
|
|
selectors : "h1,h2,h3,h4",
|
|
showAndHide : false,
|
|
scrollTo : 60
|
|
} );
|
|
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
|
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
|
|
|
} );
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
</html> |