
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja" id="main">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>TilingSprite 类</title>
	<link rel="stylesheet" href="../inc/css/style.min.css" />
	<script type="text/javascript" src="../inc/js/lib/jquery-1.11.1.min.js"></script>
	<script type="text/javascript" src="../inc/js/common.js"></script>
</head>
<body>

	<div class="main">

		<h1 class="main__title--h1 main__title--h1--v07">TilingSprite 类</h1>
		<ul class="breadcrumb">
			<li>JS 库</li>
			<li>&gt;</li>
			<li>TilingSprite 类</li>
		</ul>
		<p>以平铺方式显示图片的 sprite（精灵） 对象。</p>
		<div class="main__section">
			<h2 class="main__title--h2">构造函数</h2>
<pre class="main__pre--code">
TilingSprite ( bitmap )
</pre>
			<div class="params">
				<h4>参数：</h4>

				<ul class="params-list">
					<li class="param">
						<code class="param-name">bitmap</code>
						<span class="type">Bitmap</span>
						<div class="param-description">
							<p>需要平铺显示的图片</p>
						</div>
					</li>
				</ul>
			</div>
		</div><!-- /main__section -->


		<div class="main__section">
			<h2 class="main__title--h2">索引</h2>
			<b>方法</b>
			<ul class="main__ul--inline">
				<li><a href="#m01">move</a></li>
				<li><a href="#m02">setFrame</a></li>
				<li><a href="#m03">update</a></li>
			</ul>

			<b>属性</b>
			<ul class="main__ul--inline">
				<li><a href="#p01">bitmap</a></li>
				<li><a href="#p02">opacity</a></li>
				<li><a href="#p03">origin</a></li>
				<li><a href="#p04">visible</a></li>
				<li><a href="#p05">x</a></li>
				<li><a href="#p06">y</a></li>
			</ul>
		</div><!-- /main__section -->


		<div class="main__section">
			<h2 class="main__title--h2">方法</h2>

			<div id="m01" class="main__subsection">
<pre class="main__pre--code">
move ( x , y , width , height )
</pre>
				<p class="mb10px">直接设置 TilingSprite（平铺精灵） 的 X 坐标、Y 坐标、宽度和高度。</p>
				<div class="params">
					<h4>参数：</h4>
					<ul class="params-list">
						<li class="param">
							<code class="param-name">x</code>
							<span class="type">Number</span>
							<div class="param-description">
								<p>TilingSprite（平铺精灵） 的 X 坐标</p>
							</div>
						</li>
						<li class="param">
							<code class="param-name">y</code>
							<span class="type">Number</span>
							<div class="param-description">
								<p>TilingSprite（平铺精灵） 的 Y 坐标</p>
							</div>
						</li>
						<li class="param">
							<code class="param-name">width</code>
							<span class="type">Number</span>
							<div class="param-description">
								<p>TilingSprite（平铺精灵） 的宽度</p>
							</div>
						</li>
						<li class="param">
							<code class="param-name">height</code>
							<span class="type">Number</span>
							<div class="param-description">
								<p>TilingSprite（平铺精灵） 的高度</p>
							</div>
						</li>
					</ul>
				</div>
			</div><!-- /div -->

			<div id="m02" class="main__subsection">
<pre class="main__pre--code">
setFrame ( x , y , width , height )
</pre>
				<p class="mb10px">设置 TilingSprite（平铺精灵） 所显示 bitmap（位图） 的矩形区域。</p>
				<div class="params">
					<h4>参数：</h4>
					<ul class="params-list">
						<li class="param">
							<code class="param-name">x</code>
							<span class="type">Number</span>
							<div class="param-description">
								<p>矩形区域的 X 坐标</p>
							</div>
						</li>
						<li class="param">
							<code class="param-name">y</code>
							<span class="type">Number</span>
							<div class="param-description">
								<p>矩形区域的 Y 坐标</p>
							</div>
						</li>
						<li class="param">
							<code class="param-name">width</code>
							<span class="type">Number</span>
							<div class="param-description">
								<p>矩形区域的宽度</p>
							</div>
						</li>
						<li class="param">
							<code class="param-name">height</code>
							<span class="type">Number</span>
							<div class="param-description">
								<p>矩形区域的高度</p>
							</div>
						</li>
					</ul>
				</div>
			</div><!-- /div -->

			<div id="m03" class="main__subsection">
<pre class="main__pre--code">
update ()
</pre>
				<p class="mb10px">在每一帧中刷新 TilingSprite（平铺精灵） 。</p>
			</div><!-- /div -->

		</div><!-- /main__section -->


		<div class="main__section">
			<h2 class="main__title--h2">属性</h2>

			<div id="p01" class="main__subsection">
<pre class="main__pre--code">
bitmap <span class="pre__type">Bitmap</span>
</pre>
				<p class="mb10px">TilingSprite（平铺精灵） 所显示的图片。</p>
			</div><!-- /div -->

			<div id="p02" class="main__subsection">
<pre class="main__pre--code">
opacity <span class="pre__type">Number</span>
</pre>
				<p class="mb10px">TilingSprite（平铺精灵） 的不透明度（0 ~ 255）。</p>
			</div><!-- /div -->

			<div id="p03" class="main__subsection">
<pre class="main__pre--code">
origin <span class="pre__type">Point</span>
</pre>
				<p class="mb10px">滚动显示效果中 TilingSprite（平铺精灵） 的原点。</p>
			</div><!-- /div -->

			<div id="p04" class="main__subsection">
<pre class="main__pre--code">
visible <span class="pre__type">Boolean</span>
</pre>
				<p class="mb10px">TilingSprite（平铺精灵） 的可见性。</p>
			</div><!-- /div -->

			<div id="p05" class="main__subsection">
<pre class="main__pre--code">
x <span class="pre__type">Number</span>
</pre>
				<p class="mb10px">TilingSprite（平铺精灵） 的 X 坐标。</p>
			</div><!-- /div -->

			<div id="p06" class="main__subsection">
<pre class="main__pre--code">
y <span class="pre__type">Number</span>
</pre>
				<p class="mb10px">TilingSprite（平铺精灵） 的 Y 坐标。</p>
			</div><!-- /div -->


		</div><!-- /main__section -->


	</div><!-- /main -->

</body>
</html>
