phaser/docs/Phaser.TileSprite.html

4415 lines
67 KiB
HTML
Raw Normal View History

2013-10-25 15:54:40 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Phaser Class: TileSprite</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 ">
2014-04-10 22:13:43 +00:00
<li class="class-depth-0">
2013-10-25 15:54:40 +00:00
<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 ">
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Animation.html">Animation</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.AnimationManager.html">AnimationManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.AnimationParser.html">AnimationParser</a>
</li>
2014-04-29 14:39:02 +00:00
<li class="class-depth-1">
<a href="Phaser.ArrayList.html">ArrayList</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.BitmapData.html">BitmapData</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Button.html">Button</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Cache.html">Cache</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Camera.html">Camera</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Canvas.html">Canvas</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Circle.html">Circle</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Color.html">Color</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Device.html">Device</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Easing.html">Easing</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Easing.Back.html">Back</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Easing.Bounce.html">Bounce</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Easing.Circular.html">Circular</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Easing.Cubic.html">Cubic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Easing.Elastic.html">Elastic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Easing.Exponential.html">Exponential</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Easing.Linear.html">Linear</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Easing.Quartic.html">Quartic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Easing.Quintic.html">Quintic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Ellipse.html">Ellipse</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Events.html">Events</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Filter.html">Filter</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Frame.html">Frame</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.FrameData.html">FrameData</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Game.html">Game</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Graphics.html">Graphics</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Group.html">Group</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Image.html">Image</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Input.html">Input</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.InputHandler.html">InputHandler</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Key.html">Key</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.Line.html">Line</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Loader.html">Loader</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.LoaderParser.html">LoaderParser</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Math.html">Math</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Mouse.html">Mouse</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.MSPointer.html">MSPointer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Net.html">Net</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Particle.html">Particle</a>
</li>
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Particles.html">Particles</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Physics.html">Physics</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Physics.Ninja.html">Ninja</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Physics.P2.html">P2</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Body.html">Body</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
</li>
2014-04-10 22:13:43 +00:00
<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>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Material.html">Material</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Plugin.html">Plugin</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.PluginManager.html">PluginManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Point.html">Point</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Pointer.html">Pointer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Polygon.html">Polygon</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.QuadTree.html">QuadTree</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Rectangle.html">Rectangle</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.RenderTexture.html">RenderTexture</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.RetroFont.html">RetroFont</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.ScaleManager.html">ScaleManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Signal.html">Signal</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SignalBinding.html">SignalBinding</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Sound.html">Sound</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.SoundManager.html">SoundManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Sprite.html">Sprite</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Stage.html">Stage</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.State.html">State</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.StateManager.html">StateManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Text.html">Text</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Tile.html">Tile</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Tilemap.html">Tilemap</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.TilemapParser.html">TilemapParser</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Tileset.html">Tileset</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Time.html">Time</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Timer.html">Timer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Touch.html">Touch</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Tween.html">Tween</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.TweenManager.html">TweenManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Utils.html">Utils</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Utils.Debug.html">Debug</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.World.html">World</a>
</li>
</ul>
</li>
2014-07-18 11:45:51 +00:00
</strong>
2013-10-25 15:54:40 +00:00
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span8">
<div id="main">
<h1 class="page-title">Class: TileSprite</h1>
<section>
<header>
<h2>
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
TileSprite
</h2>
<div class="class-description"><p>Phaser.TileSprite</p></div>
2013-10-25 15:54:40 +00:00
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="TileSprite"><span class="type-signature"></span>new TileSprite<span class="signature">(game, x, y, width, height, key, frame)</span><span class="type-signature"></span></h4>
2013-10-25 15:54:40 +00:00
</dt>
<dd>
<div class="description">
<p>A TileSprite is a Sprite that has a repeating texture. The texture can be scrolled and scaled and will automatically wrap on the edges as it does so.
Please note that TileSprites, as with normal Sprites, have no input handler or physics bodies by default. Both need enabling.</p>
2013-10-25 15:54:40 +00:00
</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>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>
2013-10-25 15:54:40 +00:00
</tr>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The x coordinate (in world space) to position the TileSprite at.</p></td>
2013-10-25 15:54:40 +00:00
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The y coordinate (in world space) to position the TileSprite at.</p></td>
2013-10-25 15:54:40 +00:00
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The width of the TileSprite.</p></td>
2013-10-25 15:54:40 +00:00
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The height of the TileSprite.</p></td>
2013-10-25 15:54:40 +00:00
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type"><a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a></span>
|
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|
2013-10-25 15:54:40 +00:00
<span class="param-type">PIXI.Texture</span>
</td>
<td class="description last"><p>This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.</p></td>
</tr>
<tr>
<td class="name"><code>frame</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">number</span>
</td>
<td class="description last"><p>If this TileSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.</p></td>
2013-10-25 15:54:40 +00:00
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-21">line 21</a>
2013-10-25 15:54:40 +00:00
</li></ul></dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<dt>
<h4 class="name" id="angle"><span class="type-signature"></span>angle<span class="type-signature"></span></h4>
2013-10-25 15:54:40 +00:00
</dt>
<dd>
<div class="description">
<p>Indicates the rotation of the Sprite, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.
If you wish to work in radians instead of degrees use the property Sprite.rotation instead. Working in radians is also a little faster as it doesn't have to convert the angle.</p>
</div>
2013-10-25 15:54:40 +00:00
<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>angle</code></td>
2013-10-25 15:54:40 +00:00
<td class="type">
<span class="param-type">number</span>
2013-10-25 15:54:40 +00:00
</td>
<td class="description last"><p>The angle of this Sprite in degrees.</p></td>
2013-10-25 15:54:40 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-18 11:45:51 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-540">line 540</a>
2013-10-25 15:54:40 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="animations"><span class="type-signature"></span>animations<span class="type-signature"></span></h4>
2013-10-25 15:54:40 +00:00
</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>animations</code></td>
2013-10-25 15:54:40 +00:00
<td class="type">
<span class="param-type"><a href="Phaser.AnimationManager.html">Phaser.AnimationManager</a></span>
2013-10-25 15:54:40 +00:00
</td>
<td class="description last"><p>This manages animations of the sprite. You can modify animations through it (see Phaser.AnimationManager)</p></td>
2013-10-25 15:54:40 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-60">line 60</a>
</li></ul></dd>
2014-03-24 12:41:45 +00:00
</dl>
</dd>
<dt>
<h4 class="name" id="autoCull"><span class="type-signature"></span>autoCull<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Should this Sprite be automatically culled if out of range of the camera?
A culled sprite has its renderable property set to 'false'.
Be advised this is quite an expensive operation, as it has to calculate the bounds of the object every frame, so only enable it 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>autoCull</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>A flag indicating if the Sprite should be automatically camera culled 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>
2014-07-10 19:31:11 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-107">line 107</a>
2014-03-24 12:41:45 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="body"><span class="type-signature"></span>body<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>By default Sprites won't add themselves to any physics system and their physics body will be <code>null</code>.
To enable them for physics you need to call <code>game.physics.enable(sprite, system)</code> where <code>sprite</code> is this object
and <code>system</code> is the Physics system you want to use to manage this body. Once enabled you can access all physics related properties via <code>Sprite.body</code>.</p>
<p>Important: Enabling a Sprite for P2 or Ninja physics will automatically set <code>Sprite.anchor</code> to 0.5 so the physics body is centered on the Sprite.
If you need a different result then adjust or re-create the Body shape offsets manually, and/or reset the anchor after enabling physics.</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>body</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Physics.Arcade.Body.html">Phaser.Physics.Arcade.Body</a></span>
|
<span class="param-type"><a href="Phaser.Physics.P2.Body.html">Phaser.Physics.P2.Body</a></span>
|
<span class="param-type"><a href="Phaser.Physics.Ninja.Body.html">Phaser.Physics.Ninja.Body</a></span>
|
<span class="param-type">null</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>null</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-10 19:31:11 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-134">line 134</a>
2013-10-25 15:54:40 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="cameraOffset"><span class="type-signature"></span>cameraOffset<span class="type-signature"></span></h4>
2013-10-25 15:54:40 +00:00
</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>cameraOffset</code></td>
2013-10-25 15:54:40 +00:00
<td class="type">
<span class="param-type"><a href="Phaser.Point.html">Phaser.Point</a></span>
2013-10-25 15:54:40 +00:00
</td>
<td class="description last"><p>If this object is fixedToCamera then this stores the x/y offset that its drawn at, from the top-left of the camera view.</p></td>
2013-10-25 15:54:40 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-10 19:31:11 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-121">line 121</a>
2014-03-24 12:41:45 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="checkWorldBounds"><span class="type-signature"></span>checkWorldBounds<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>If true the Sprite checks if it is still within the world each frame, when it leaves the world it dispatches Sprite.events.onOutOfBounds
and optionally kills the sprite (if Sprite.outOfBoundsKill is true). By default this is disabled because the Sprite has to calculate its
bounds every frame to support it, and not all games need it. Enable it by setting the value to true.</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>checkWorldBounds</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>
2014-07-10 19:31:11 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-116">line 116</a>
2013-10-25 15:54:40 +00:00
</li></ul></dd>
2014-04-29 14:39:02 +00:00
</dl>
</dd>
<dt>
<h4 class="name" id="destroyPhase"><span class="type-signature"></span>destroyPhase<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>destroyPhase</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>True if this object is currently being destroyed.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-18 11:45:51 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-779">line 779</a>
2014-04-29 14:39:02 +00:00
</li></ul></dd>
2013-10-25 15:54:40 +00:00
</dl>
</dd>
<dt>
<h4 class="name" id="events"><span class="type-signature"></span>events<span class="type-signature"></span></h4>
2013-10-25 15:54:40 +00:00
</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>events</code></td>
2013-10-25 15:54:40 +00:00
<td class="type">
<span class="param-type"><a href="Phaser.Events.html">Phaser.Events</a></span>
2013-10-25 15:54:40 +00:00
</td>
<td class="description last"><p>The Events you can subscribe to that are dispatched when certain things happen on this Sprite or its components.</p></td>
2013-10-25 15:54:40 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-55">line 55</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="exists"><span class="type-signature"></span>exists<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>TileSprite.exists controls if the core game loop and physics update this TileSprite or not.
When you set TileSprite.exists to false it will remove its Body from the physics world (if it has one) and also set TileSprite.visible to false.
Setting TileSprite.exists to true will re-add the Body to the physics world (if it has a body) and set TileSprite.visible to true.</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>exists</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If the TileSprite is processed by the core game update and physics.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-18 11:45:51 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-637">line 637</a>
2013-10-25 15:54:40 +00:00
</li></ul></dd>
</dl>
</dd>
2013-11-28 15:57:09 +00:00
<dt>
<h4 class="name" id="fixedToCamera"><span class="type-signature"></span>fixedToCamera<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<div class="description">
<p>An TileSprite that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in TileSprite.cameraOffset.
Note that the cameraOffset values are in addition to any parent in the display list.
So if this TileSprite was in a Group that has x: 200, then this will be added to the cameraOffset.x</p>
2013-11-28 15:57:09 +00:00
</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>fixedToCamera</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>Set to true to fix this TileSprite to the Camera at its current world coordinates.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
2013-10-25 15:54:40 +00:00
2013-11-28 15:57:09 +00:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-18 11:45:51 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-606">line 606</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="frame"><span class="type-signature"></span>frame<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</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>frame</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type">number</span>
2013-11-28 15:57:09 +00:00
</td>
<td class="description last"><p>Gets or sets the current frame index and updates the Texture Cache for display.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-18 11:45:51 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-564">line 564</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="frameName"><span class="type-signature"></span>frameName<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</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>frameName</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type">string</span>
2013-11-28 15:57:09 +00:00
</td>
<td class="description last"><p>Gets or sets the current frame name and updates the Texture Cache for display.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-18 11:45:51 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-585">line 585</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="game"><span class="type-signature"></span>game<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</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>
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>
2013-11-28 15:57:09 +00:00
</td>
<td class="description last"><p>A reference to the currently running Game.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-33">line 33</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="input"><span class="type-signature"></span>input<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>input</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.InputHandler.html">Phaser.InputHandler</a></span>
|
<span class="param-type">null</span>
</td>
<td class="description last"><p>The Input Handler for this object. Needs to be enabled with image.inputEnabled = true before you can use it.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-10 19:31:11 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-92">line 92</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="inputEnabled"><span class="type-signature"></span>inputEnabled<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>By default a TileSprite won't process any input events at all. By setting inputEnabled to true the Phaser.InputHandler is
activated for this object and it will then start to process click/touch events and more.</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>inputEnabled</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>Set to true to allow this object to receive input events.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-18 11:45:51 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-684">line 684</a>
</li></ul></dd>
2013-11-28 15:57:09 +00:00
</dl>
</dd>
<dt>
<h4 class="name" id="key"><span class="type-signature"></span>key<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</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>key</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type"><a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a></span>
|
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|
<span class="param-type">PIXI.Texture</span>
2013-11-28 15:57:09 +00:00
</td>
<td class="description last"><p>This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-65">line 65</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</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>name</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type">string</span>
2013-11-28 15:57:09 +00:00
</td>
<td class="description last"><p>The user defined name given to this Sprite.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-39">line 39</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="type"><span class="type-signature">&lt;readonly> </span>type<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</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>type</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type">number</span>
2013-11-28 15:57:09 +00:00
</td>
<td class="description last"><p>The const type of this object.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-45">line 45</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="world"><span class="type-signature"></span>world<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</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>world</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type"><a href="Phaser.Point.html">Phaser.Point</a></span>
2013-11-28 15:57:09 +00:00
</td>
<td class="description last"><p>The world coordinates of this Sprite. This differs from the x/y coordinates which are relative to the Sprites container.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-10 19:31:11 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-97">line 97</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="x"><span class="type-signature"></span>x<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>The position of the TileSprite on the x axis relative to the local coordinates of the parent.</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>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The position of the TileSprite on the x axis relative to the local coordinates of the parent.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-18 11:45:51 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-725">line 725</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="y"><span class="type-signature"></span>y<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>The position of the TileSprite on the y axis relative to the local coordinates of the parent.</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>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The position of the TileSprite on the y axis relative to the local coordinates of the parent.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-18 11:45:51 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-752">line 752</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="z"><span class="type-signature"></span>z<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>z</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The z-depth value of this object within its Group (remember the World is a Group as well). No two objects in a Group can have the same z value.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-50">line 50</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
2013-11-28 15:57:09 +00:00
<dt>
<h4 class="name" id="autoScroll"><span class="type-signature"></span>autoScroll<span class="signature">()</span><span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<div class="description">
<p>Sets this TileSprite to automatically scroll in the given direction until stopped via TileSprite.stopScroll().
The scroll speed is specified in pixels per second.
A negative x value will scroll to the left. A positive x value will scroll to the right.
A negative y value will scroll up. A positive y value will scroll down.</p>
</div>
2013-11-28 15:57:09 +00:00
<dl class="details">
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-04-29 14:39:02 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-297">line 297</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
2013-11-28 15:57:09 +00:00
</dd>
<dt>
<h4 class="name" id="destroy"><span class="type-signature"></span>destroy<span class="signature">(<span class="optional">destroyChildren</span>)</span><span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<div class="description">
<p>Destroys the TileSprite. This removes it from its parent group, destroys the event and animation handlers if present
and nulls its reference to game, freeing it up for garbage collection.</p>
</div>
2013-11-28 15:57:09 +00:00
<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>destroyChildren</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>Should every child of this object have its destroy method called?</p></td>
</tr>
</tbody>
</table>
2013-11-28 15:57:09 +00:00
<dl class="details">
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-18 11:45:51 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-421">line 421</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="loadTexture"><span class="type-signature"></span>loadTexture<span class="signature">(key, frame)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Changes the Texture the TileSprite is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache.
This causes a WebGL texture update, so use sparingly or in low-intensity portions of your game.</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type"><a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a></span>
|
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|
<span class="param-type">PIXI.Texture</span>
</td>
2014-07-10 19:31:11 +00:00
<td class="description last"><p>This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture.</p></td>
</tr>
<tr>
<td class="name"><code>frame</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">number</span>
</td>
2014-07-10 19:31:11 +00:00
<td class="description last"><p>If this TileSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-04-29 14:39:02 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-324">line 324</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="play"><span class="type-signature"></span>play<span class="signature">(name, <span class="optional">frameRate</span>, <span class="optional">loop</span>, <span class="optional">killOnComplete</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Animation.html">Phaser.Animation</a>}</span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<div class="description">
<p>Play an animation based on the given key. The animation should previously have been added via sprite.animations.add()
If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.</p>
2013-11-28 15:57:09 +00:00
</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>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The name of the animation to be played, e.g. &quot;fire&quot;, &quot;walk&quot;, &quot;jump&quot;.</p></td>
</tr>
<tr>
<td class="name"><code>frameRate</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.</p></td>
</tr>
<tr>
<td class="name"><code>loop</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.</p></td>
</tr>
<tr>
<td class="name"><code>killOnComplete</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
2013-11-28 15:57:09 +00:00
</td>
<td class="description last"><p>If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-18 11:45:51 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-486">line 486</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>A reference to playing Animation instance.</p>
2013-11-28 15:57:09 +00:00
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.Animation.html">Phaser.Animation</a></span>
</dd>
</dl>
2013-11-28 15:57:09 +00:00
</dd>
<dt>
<h4 class="name" id="postUpdate"><span class="type-signature"></span>postUpdate<span class="signature">()</span><span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<div class="description">
<p>Internal function called by the World postUpdate cycle.</p>
2013-11-28 15:57:09 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-04-29 14:39:02 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-269">line 269</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="preUpdate"><span class="type-signature"></span>preUpdate<span class="signature">()</span><span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<div class="description">
<p>Automatically called by World.preUpdate.</p>
2013-11-28 15:57:09 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-04-29 14:39:02 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-159">line 159</a>
2014-03-24 12:41:45 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="reset"><span class="type-signature"></span>reset<span class="signature">(x, y)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Resets the TileSprite. This places the TileSprite at the given x/y world coordinates, resets the tilePosition and then
sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state.
If the TileSprite has a physics body that too is reset.</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>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The x coordinate (in world space) to position the Sprite at.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The y coordinate (in world space) to position the Sprite at.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-18 11:45:51 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-504">line 504</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
2014-03-24 12:41:45 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>(Phaser.TileSprite) This instance.</p>
</div>
2013-11-28 15:57:09 +00:00
2014-07-10 19:31:11 +00:00
</dd>
<dt>
<h4 class="name" id="setFrame"><span class="type-signature"></span>setFrame<span class="signature">(frame)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the Texture frame the TileSprite uses for rendering.
This is primarily an internal method used by TileSprite.loadTexture, although you may call it 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>frame</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Frame.html">Phaser.Frame</a></span>
</td>
<td class="description last"><p>The Frame to be used by the TileSprite texture.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-18 11:45:51 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-374">line 374</a>
2014-07-10 19:31:11 +00:00
</li></ul></dd>
</dl>
2013-11-28 15:57:09 +00:00
</dd>
<dt>
<h4 class="name" id="stopScroll"><span class="type-signature"></span>stopScroll<span class="signature">()</span><span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<div class="description">
<p>Stops an automatically scrolling TileSprite.</p>
2013-11-28 15:57:09 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-04-29 14:39:02 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-312">line 312</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="update"><span class="type-signature"></span>update<span class="signature">()</span><span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<div class="description">
<p>Override and use this function in your own custom objects to handle any update requirements you may have.</p>
2013-11-28 15:57:09 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-04-29 14:39:02 +00:00
<a href="TileSprite.js.html">gameobjects/TileSprite.js</a>, <a href="TileSprite.js.html#sunlight-1-line-259">line 259</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
</dl>
2013-10-25 15:54:40 +00:00
</article>
</section>
</div>
<div class="clearfix"></div>
<footer>
<span class="copyright">
2014-02-05 06:29:17 +00:00
Phaser Copyright © 2012-2014 Photon Storm Ltd.
2013-10-25 15:54:40 +00:00
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
2014-07-18 11:45:51 +00:00
on Fri Jul 18 2014 12:36:57 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
2013-10-25 15:54:40 +00:00
</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( {
2014-04-10 22:13:43 +00:00
anchorName : function(i, heading, prefix) {
return $(heading).attr("id") || ( prefix + i );
},
2013-10-25 15:54:40 +00:00
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>