<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="th">
	<id>http://158.108.32.49/wiki/index.php?action=history&amp;feed=atom&amp;title=418383%2F418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553%2F%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2</id>
	<title>418383/418587 ภาคปลาย 2553/การบ้าน 2 - ประวัติรุ่นแก้ไข</title>
	<link rel="self" type="application/atom+xml" href="http://158.108.32.49/wiki/index.php?action=history&amp;feed=atom&amp;title=418383%2F418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553%2F%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2"/>
	<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418383/418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2&amp;action=history"/>
	<updated>2026-05-06T21:08:36Z</updated>
	<subtitle>ประวัติรุ่นแก้ไขของหน้านี้ในวิกิ</subtitle>
	<generator>MediaWiki 1.33.1</generator>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=418383/418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2&amp;diff=10551&amp;oldid=prev</id>
		<title>Cardcaptor: /* 2. เพิ่มไอเทมที่เก็บแล้วผู้เล่นสามารถยิงลูกกระสุนปืนออกจากแป้นได้ (30 คะแนน) */</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418383/418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2&amp;diff=10551&amp;oldid=prev"/>
		<updated>2011-01-12T09:29:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;2. เพิ่มไอเทมที่เก็บแล้วผู้เล่นสามารถยิงลูกกระสุนปืนออกจากแป้นได้ (30 คะแนน)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;th&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;←รุ่นแก้ไขก่อนหน้า&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;รุ่นแก้ไขเมื่อ 09:29, 12 มกราคม 2554&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l39&quot; &gt;แถว 39:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;แถว 39:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ในการทำโจทย์ข้อนี้เราแนะนำให้คุณแบ่งการทำงานเป็นสามขั้นตอน ดังนี้&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ในการทำโจทย์ข้อนี้เราแนะนำให้คุณแบ่งการทำงานเป็นสามขั้นตอน ดังนี้&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;สร้าง GameObject สำหรับแทนลูกกระสูน&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;สร้าง GameObject สำหรับแทนลูกกระสูน&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* สร้าง subclass &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ของ [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/interface_breakout_lib_1_1_game_object.html GameObject] &lt;/del&gt;ขึ้นมาใหม่ ชื่อ Bullet สำหรับแทนลูกกระสุน&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* สร้าง subclass &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ของGameObject &lt;/ins&gt;ขึ้นมาใหม่ ชื่อ Bullet สำหรับแทนลูกกระสุน&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* เพิ่มเมธอด &amp;lt;tt&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;void CheckCollisionWithBullet&lt;/del&gt;(Bullet bullet)&amp;lt;/tt&amp;gt; เข้่าใน GameObject แล้ว implement &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;เมธอดนี้ให้ subclass ของ GameObject ทุกคลาส&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* เพิ่มเมธอด &amp;lt;tt&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;private static bool CheckCollisionSpecific(Bullet bullet, Brick brick)&amp;lt;/tt&amp;gt; และ &amp;lt;tt&amp;gt;private static bool CheckCollisionSpecific&lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Brick brick, &lt;/ins&gt;Bullet bullet)&amp;lt;/tt&amp;gt; เข้่าใน GameObject แล้ว implement &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;เมธอดนี้&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;สร้าง event ชื่อ &lt;/del&gt;&amp;lt;tt&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;BrickHitBullet&lt;/del&gt;&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;เพื่อแทนเหตุการณ์ลูกกระสุนกระทบบล็อก&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;เขียนเมธอด &lt;/ins&gt;&amp;lt;tt&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;void HandleSpecificCollision(Bullet bullet, Brick brick)&lt;/ins&gt;&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;และ &lt;/ins&gt;&amp;lt;tt&amp;gt;void &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;HandleSpecificCollision&lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Brick brick, Bullet bullet&lt;/ins&gt;)&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;เพื่อแทนเหตุการณ์ลูกกระสุนกระทบบล็อก&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;#* สร้างเมธอด &lt;/del&gt;&amp;lt;tt&amp;gt;void &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Visit&lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;BrickHitBullet ev&lt;/del&gt;)&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ใน [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/interface_breakout_lib_1_1_event_visitor.html EventVisitor] แล้วเขียนเมธอดนี้ให้ subclass ทุกตัวของ EventVisitor (ในตอนนี้มีสองตัวคือ GameState และ ScoreManager)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;สร้าง BarType ใหม่&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;สร้าง BarType ใหม่&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[http://theory.cpe.ku.ac&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;th/~pramook/418383/homework-02/doc/html/class_breakout_lib_1_1_bar_type.html BarType] &lt;/del&gt;เป็นคลาสที่ใช้กำหนดพฤติกรรมของแป้นเมื่อมันได้รับไอเทมแบบต่างๆ&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;BarType (ใน Bar&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;cs) &lt;/ins&gt;เป็นคลาสที่ใช้กำหนดพฤติกรรมของแป้นเมื่อมันได้รับไอเทมแบบต่างๆ&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* ให้สร้าง BarType ใหม่ที่ใช้แทนแป้นเมื่อมันสามารถยิงลูกกระสุนได้&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* ให้สร้าง BarType ใหม่ที่ใช้แทนแป้นเมื่อมันสามารถยิงลูกกระสุนได้&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* เขียนเมธอด &amp;lt;tt&amp;gt;void &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;	Control &lt;/del&gt;(KeySensor keySensor, GameState gameState)&amp;lt;/tt&amp;gt; ซึ่งรับข้อมูลเข้าทางคีย์บอร์ดจาก KeySensor แล้วควบคุมแป้นตามนั้น ในการเขียนเมธอดนี้คุณจะต้องทำให้&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* เขียนเมธอด &amp;lt;tt&amp;gt;void &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ControlBar&lt;/ins&gt;(KeySensor keySensor, GameState gameState)&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ใน GameState &lt;/ins&gt;ซึ่งรับข้อมูลเข้าทางคีย์บอร์ดจาก KeySensor แล้วควบคุมแป้นตามนั้น ในการเขียนเมธอดนี้คุณจะต้องทำให้&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** ถ้ามีลูกบอลติดอยู่กับแป้นอยู่ เมื่อกด spacebar (&amp;lt;tt&amp;gt;KeyMapping.LaunchKey&amp;lt;/tt&amp;gt; ให้ยิงลูกบอลออกไปก่อน &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ให้ดูตัวอย่างวิธีการยิงลูกบอลจากคลาส [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/class_breakout_lib_1_1_magnet_bar_type.html MagnetBarType]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** ถ้ามีลูกบอลติดอยู่กับแป้นอยู่ เมื่อกด spacebar (&amp;lt;tt&amp;gt;KeyMapping.LaunchKey&amp;lt;/tt&amp;gt; ให้ยิงลูกบอลออกไปก่อน&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** ถ้าไม่มีลูกบอลติดอยู่กับแป้นเลย ให้ยิงลูกกระสุนออกสองลูก&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** ถ้าไม่มีลูกบอลติดอยู่กับแป้นเลย &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;และ barType เป็นแบบที่ยิงปืนได้ &lt;/ins&gt;ให้ยิงลูกกระสุนออกสองลูก&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;สร้าง Item ชนิดใหม่&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;สร้าง Item ชนิดใหม่&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* สร้าง subclass ของ Item สำหรับแทนไอเทมชนิดใหม่ &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;แล้วเขียนเมธอด &lt;/del&gt;&amp;lt;tt&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;PutPowerupEffectToBar&amp;lt;/tt&amp;gt; เพื่อเปลี่ยนรูปแบบของแป้นไปเป็นรูปแบบที่ียิงกระสนุได้ แล้วจึงเขียนเมธอด &amp;lt;tt&amp;gt;CancelPowerupEffectToBar&lt;/del&gt;&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;เพื่อคืน &lt;/del&gt;BarType &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ใ้ห้เป็น [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/class_breakout_lib_1_1_normal_bar_type.html NormalBarType] เมื่อหมดเวลา (ดูวิธีจับเวลาได้ที่ [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/class_breakout_lib_1_1_magnet_bar_type.html MagnetBarType])&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* สร้าง subclass ของ Item สำหรับแทนไอเทมชนิดใหม่ &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;แล้วเขียนแก้เมธอด &lt;/ins&gt;&amp;lt;tt&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;HandleSpecificCollision(Bar bar, Item item)&lt;/ins&gt;&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;เพื่อทำให้เวลาลูกบอลชนไอเทมแบบใหม่ให้มันเปลี่ยน barType เป็น &lt;/ins&gt;BarType &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;แบบใหม่ที่เราสร้างขึ้นมา&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ท้ายสุด อย่าลืมแก้ content pipeline ให้อ่านไอเทมชนิดใหม่ีนี้เข้ามาได้ด้วย&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ท้ายสุด อย่าลืมแก้ content pipeline ให้อ่านไอเทมชนิดใหม่ีนี้เข้ามาได้ด้วย&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cardcaptor</name></author>
		
	</entry>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=418383/418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2&amp;diff=10550&amp;oldid=prev</id>
		<title>Cardcaptor: /* แก้ไข Content Pipeline ให้อ่านไอเทมชนิดที่สามได้ */</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418383/418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2&amp;diff=10550&amp;oldid=prev"/>
		<updated>2011-01-12T09:21:55Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;แก้ไข Content Pipeline ให้อ่านไอเทมชนิดที่สามได้&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;th&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;←รุ่นแก้ไขก่อนหน้า&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;รุ่นแก้ไขเมื่อ 09:21, 12 มกราคม 2554&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l17&quot; &gt;แถว 17:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;แถว 17:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== แก้ไข Content Pipeline ให้อ่านไอเทมชนิดที่สามได้ ====&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== แก้ไข Content Pipeline ให้อ่านไอเทมชนิดที่สามได้ ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Map ที่ให้ไปในเกม (ไฟล์ map-01.txt ใน BreakoutContent) สามารถใส่ไอเทมได้ 4 ชนิด (แทนด้วยตัวอักษร 1, 2, 3, 4 ตามลำดับ) แต่ในตอนนี้เกมสามารถอ่านไอเทมได้แค่ชนิด 1 กับ 2 เท่านั้น เนื่องจากใน &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;BreakoutMapReader&lt;/del&gt;.cs ในโปรเจค &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;BreakoutMapContentPipeline &lt;/del&gt;มีการกำหนดเงื่อนไขดังต่ีอไปนี้&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Map ที่ให้ไปในเกม (ไฟล์ map-01.txt ใน BreakoutContent) สามารถใส่ไอเทมได้ 4 ชนิด (แทนด้วยตัวอักษร 1, 2, 3, 4 ตามลำดับ) แต่ในตอนนี้เกมสามารถอ่านไอเทมได้แค่ชนิด 1 กับ 2 เท่านั้น เนื่องจากใน &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;MapReader&lt;/ins&gt;.cs ในโปรเจค &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;BreakoutLib &lt;/ins&gt;มีการกำหนดเงื่อนไขดังต่ีอไปนี้&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;geshi lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;geshi lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Item item = null;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;if (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;brickType &amp;gt;&lt;/ins&gt;= 0)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;if (&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;brickFromFile.itemType !&lt;/del&gt;= 0) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;//This brick come with its item. load it.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;  switch &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;brickFromFile.&lt;/del&gt;itemType)&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;    Item item = null;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;  {&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;    if &lt;/ins&gt;(itemType &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;== 0&lt;/ins&gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;    case 1: &lt;/del&gt;item = new LongBarItem()&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;; break&lt;/del&gt;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;        &lt;/ins&gt;item = new LongBarItem();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;case 2: &lt;/del&gt;item = new MagnetBarItem(); &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; break&lt;/del&gt;; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;                       &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;else if (itemType == 1)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;  }&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;        &lt;/ins&gt;item = new MagnetBarItem();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;    Brick brick = new Brick((BrickColor)brickType, x, y, item)&lt;/ins&gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;    map.Bricks.Add(brick);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/geshi&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/geshi&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cardcaptor</name></author>
		
	</entry>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=418383/418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2&amp;diff=10549&amp;oldid=prev</id>
		<title>Cardcaptor: /* อนิเมชันของส่วนประกอบต่างๆ */</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418383/418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2&amp;diff=10549&amp;oldid=prev"/>
		<updated>2011-01-12T09:19:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;อนิเมชันของส่วนประกอบต่างๆ&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;th&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;←รุ่นแก้ไขก่อนหน้า&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;รุ่นแก้ไขเมื่อ 09:19, 12 มกราคม 2554&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l54&quot; &gt;แถว 54:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;แถว 54:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== อนิเมชันของส่วนประกอบต่างๆ ====&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== อนิเมชันของส่วนประกอบต่างๆ ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* ลูกกระสุน อยู่ที่ไฟล์ &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;BreakoutLib&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Content&lt;/del&gt;/bullet.anim&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* ลูกกระสุน อยู่ที่ไฟล์ &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Breakout&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;BreakoutContent&lt;/ins&gt;/bullet.anim&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* แป้นเมื่อยิงปืนได้ อยู่ืที่ไฟล์ &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;BreakoutLib&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Content&lt;/del&gt;/gun_bar_type.anim&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* แป้นเมื่อยิงปืนได้ อยู่ืที่ไฟล์ &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Breakout&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;BreakoutContent&lt;/ins&gt;/gun_bar_type.anim&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* ไอเทม อยู่ที่ไฟล์ &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;BreakoutLib&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Content&lt;/del&gt;/gun_item.anim&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* ไอเทม อยู่ที่ไฟล์ &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Breakout&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;BreakoutContent&lt;/ins&gt;/gun_item.anim&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 3. เพิ่มด่าน (20 คะแนน) ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 3. เพิ่มด่าน (20 คะแนน) ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cardcaptor</name></author>
		
	</entry>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=418383/418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2&amp;diff=10548&amp;oldid=prev</id>
		<title>Cardcaptor: /* 3. เพิ่มด่าน (20 คะแนน) */</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418383/418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2&amp;diff=10548&amp;oldid=prev"/>
		<updated>2011-01-12T09:18:55Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;3. เพิ่มด่าน (20 คะแนน)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;th&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;←รุ่นแก้ไขก่อนหน้า&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;รุ่นแก้ไขเมื่อ 09:18, 12 มกราคม 2554&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l59&quot; &gt;แถว 59:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;แถว 59:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 3. เพิ่มด่าน (20 คะแนน) ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 3. เพิ่มด่าน (20 คะแนน) ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;สร้างด่านเพิ่มขึ้นอีกสองด่าน โดยทำการสร้าง map ใหม่ 2 map โดยใช้โปรแกรมสร้าง map ที่ให้ข้างบน &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;(ห้ามใช้ map-02.txt และ map-03.txt ที่ใ้ห้มา) &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;สร้างด่านเพิ่มขึ้นอีกสองด่าน โดยทำการสร้าง map ใหม่ 2 map โดยใช้โปรแกรมสร้าง map ที่ให้ข้างบน&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;แก้ไข &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;PlayScene &lt;/del&gt;และส่วนประกอบอื่นๆ ของเกมตามที่จำเป็น เพื่อให้หลังจากจบด่านแรกในเกมแล้ว เกมจะไปเริ่มต้นที่ด่านที่สองโดยอัตโนมัติ และทำเช่นเดียวกันกับด่านที่สาม และเมื่อผู้เล่นผ่านด่านที่สามแล้ว ให้แสดงฉากว่าผู้เล่นได้เคลียร์เกมแล้ว&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;แก้ไข &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;PlayScreen &lt;/ins&gt;และส่วนประกอบอื่นๆ ของเกมตามที่จำเป็น เพื่อให้หลังจากจบด่านแรกในเกมแล้ว เกมจะไปเริ่มต้นที่ด่านที่สองโดยอัตโนมัติ และทำเช่นเดียวกันกับด่านที่สาม และเมื่อผู้เล่นผ่านด่านที่สามแล้ว ให้แสดงฉากว่าผู้เล่นได้เคลียร์เกมแล้ว&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;โจทย์ข้อนี้มีวิธีทำสองวิธี&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;โจทย์ข้อนี้มีวิธีทำสองวิธี&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;สังเกตว่าใน [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/class_breakout_lib_1_1_play_scene.html PlayScene] หนึ่งตัวจะมี map อยู่หนึ่งอัน ดังนั้นหากอยากให้มีหลายด่าน ก็ให้สร้าง PlayScene &lt;/del&gt;ขึ้นมาอีก 2 instance โดยให้แต่ละอันใช้ map ที่แตกต่างไป เพื่อให้ &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;PlayScene &lt;/del&gt;หนึ่งตัวแทนด่านหนึ่งด่าน (ในวิธีการนี้คุณอาจจะต้องสร้าง &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;scene &lt;/del&gt;อื่นๆ เพิ่มเติมเพื่อช่วยในการเปลี่ยนฉากด้วย)&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ให้สร้าง PlayScreen &lt;/ins&gt;ขึ้นมาอีก 2 instance โดยให้แต่ละอันใช้ map ที่แตกต่างไป เพื่อให้ &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;PlayScreen &lt;/ins&gt;หนึ่งตัวแทนด่านหนึ่งด่าน (ในวิธีการนี้คุณอาจจะต้องสร้าง &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;screen &lt;/ins&gt;อื่นๆ เพิ่มเติมเพื่อช่วยในการเปลี่ยนฉากด้วย)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* ให้มี &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;PlayScene &lt;/del&gt;แค่ instance เดียว แต่สร้างคลาสขึ้นมาอีกคลาสหนึ่งที่เก็บลำดับของ map ของทั้งเกมเอาไว้ แล้วให้คลาสนี้ไปเปลี่ยน map ที่ &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;PlayScene &lt;/del&gt;ใช้&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* ให้มี &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;PlayScreen &lt;/ins&gt;แค่ instance เดียว แต่สร้างคลาสขึ้นมาอีกคลาสหนึ่งที่เก็บลำดับของ map ของทั้งเกมเอาไว้ แล้วให้คลาสนี้ไปเปลี่ยน map ที่ &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;PlayScreen &lt;/ins&gt;ใช้&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 4. เพิ่มเสียง (20 คะแนน) ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 4. เพิ่มเสียง (20 คะแนน) ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cardcaptor</name></author>
		
	</entry>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=418383/418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2&amp;diff=10547&amp;oldid=prev</id>
		<title>Cardcaptor: /* 4. เพิ่มเสียง (20 คะแนน) */</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418383/418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2&amp;diff=10547&amp;oldid=prev"/>
		<updated>2011-01-12T09:17:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;4. เพิ่มเสียง (20 คะแนน)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;th&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;←รุ่นแก้ไขก่อนหน้า&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;รุ่นแก้ไขเมื่อ 09:17, 12 มกราคม 2554&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l80&quot; &gt;แถว 80:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;แถว 80:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* เพลงสั้นๆ ที่เล่นเวลาผู้เล่นผ่านด่าน&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* เพลงสั้นๆ ที่เล่นเวลาผู้เล่นผ่านด่าน&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;วิธีการที่ง่ายที่สุดในการทำโจทย์ข้อนี้คือการสร้างคลาส SoundSystem ซึ่งสืบทอดมาจาก [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/interface_breakout_lib_1_1_event_visitor.html EventVisitor] เหมือนกับโ้ค้ดตัวอย่างในการบรรยายครั้งที่เกี่ยวกับการสร้างเสียง &lt;/del&gt;โดยถ้าคุณอยากให้เหตุำการณ์ใดมีเสียงก็ให้สร้าง subclass ของ Event สำหรับเหตุการณ์นั้นมา แล้วเขียนเมธอด &amp;lt;tt&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Visit&lt;/del&gt;&amp;lt;/tt&amp;gt; ของ &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;SoundSystem &lt;/del&gt;ให้เล่นเสียงที่คุณต้องการ&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;วิธีการที่ง่ายที่สุดในการทำโจทย์ข้อนี้คือเวลาจัดการ event ให้ทำการเล่นเสียง &lt;/ins&gt;โดยถ้าคุณอยากให้เหตุำการณ์ใดมีเสียงก็ให้สร้าง subclass ของ Event สำหรับเหตุการณ์นั้นมา แล้วเขียนเมธอด &amp;lt;tt&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;HandleSpecificEvent&lt;/ins&gt;&amp;lt;/tt&amp;gt; ของ &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;GameState &lt;/ins&gt;ให้เล่นเสียงที่คุณต้องการ&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 5. ทำให้เกมสวยงาม (10 คะแนน) ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 5. ทำให้เกมสวยงาม (10 คะแนน) ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;เปลี่ยนหน้า Title, หน้า Game Over, หน้าจอระหว่างเล่นเกม, ฯลฯ ให้เป็นไปตามที่คุณชอบ&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;เปลี่ยนหน้า Title, หน้า Game Over, หน้าจอระหว่างเล่นเกม, ฯลฯ ให้เป็นไปตามที่คุณชอบ&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cardcaptor</name></author>
		
	</entry>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=418383/418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2&amp;diff=10546&amp;oldid=prev</id>
		<title>Cardcaptor: หน้าที่ถูกสร้างด้วย &#039;ให้ไว้ ณ วันพุธที่ 13 ม.ค. 2554 ส่ง&#039;&#039;&#039;วันศุกร์ที่ 11 ก.พ. 2554 เว…&#039;</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418383/418587_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99_2&amp;diff=10546&amp;oldid=prev"/>
		<updated>2011-01-12T09:16:53Z</updated>

		<summary type="html">&lt;p&gt;หน้าที่ถูกสร้างด้วย &amp;#039;ให้ไว้ ณ วันพุธที่ 13 ม.ค. 2554 ส่ง&amp;#039;&amp;#039;&amp;#039;วันศุกร์ที่ 11 ก.พ. 2554 เว…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;หน้าใหม่&lt;/b&gt;&lt;/p&gt;&lt;div&gt;ให้ไว้ ณ วันพุธที่ 13 ม.ค. 2554 ส่ง&amp;#039;&amp;#039;&amp;#039;วันศุกร์ที่ 11 ก.พ. 2554 เวลา 23.59 น.&amp;#039;&amp;#039;&amp;#039; โดย zip ไฟล์ในไดเรกทอรี Breakout ส่งมาที่ pramook at gmail dot com&lt;br /&gt;
== เริ่มต้น ==&lt;br /&gt;
* ให้ดาวน์โหลดซอร์สโค้ดของโปรแกรมเกม Breakout จาก http://theory.cpe.ku.ac.th/~pramook/418383/codes/Breakout.zip&lt;br /&gt;
* คุณสามารถดาวน์โหลดโปรแกรมเกม Breakout ที่มีฟีเจอร์ครบทุกอย่างตามที่บอกในการบ้านนี้มาดูเป็นตัวอย่างได้ที่ http://theory.cpe.ku.ac.th/~pramook/418383/codes/Breakout-Complete.zip&lt;br /&gt;
* คุณสามารถดาวน์โหลดโปรแกรมที่ใช้สร้าง map สำหรับเกม Breakout ได้ที่นี่ http://theory.cpe.ku.ac.th/~pramook/418383/codes/BreakoutMapEditor.zip&lt;br /&gt;
&lt;br /&gt;
== งานของคุณ ==&lt;br /&gt;
=== 1. เพิ่มไอเทมที่เก็บแล้วมีลูกบอลเพิ่มขึ้นสองลูก (20 คะแนน) ===&lt;br /&gt;
ในตอนนี้เกม Breakout ในโค้ดตั้งต้นมีไอเทมเพียงสองชนิด คือ ไอเทมที่เก็บแล้วแป้นสามารถจับและปล่อยลูกบอลได้ (ไิอเทม A) กับไอเทมที่เก็บแล้วแป้นมีความยาวมากขึ้น (ไอเทม B)&lt;br /&gt;
&lt;br /&gt;
ในข้อนี้ให้คุณสร้างไอเทมชนิดใหม่ ซึ่ีงเมื่อเก็บแล้วแป้นจะปล่อยลูกบอลออกมาสองลูก ลูกหนึ่งพุ่งออกทางด้านซ้าน อีกลูกพุ่งออกทางด้านขวา ลูกบอลนี้จะต้องมีสมบัติเหมือนลูกบอลที่มีอยู่แล้วทุกประการ และเมื่อแป้นยิงลูกบอลใหม่มาแล้ว ลูกบอลเดิมสามารถที่จะหล่นออกจากฉากไปได้โดยที่ผู้เล่นจะยังไม่ตาย (กล่าวคือผู้เล่นจะตายก็ต่อเมื่อไม่มีลูกบอลเหลือในฉากแล้วเท่านั้น)&lt;br /&gt;
&lt;br /&gt;
วิธีการที่ง่ายที่สุดในการทำโจทย์ข้อนี้คือการเขียน subclass ของ Item แล้ว implement เมธอด &amp;lt;tt&amp;gt;CollideWithBar&amp;lt;/tt&amp;gt; ของมันให้เพิ่มลูกบอลเข้าไปสองลูกใส่ &amp;lt;tt&amp;gt;GameState&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== อนิเมชันของไอเทม ====&lt;br /&gt;
เ้ราได้สร้างอนิเมชันของไอเทมชนิดนี้เอาไว้ให้คุณแล้ว มันอยู่ในไฟล์ extra_balls_item.anim ใน Content ของโปรเจค BreakoutContent&lt;br /&gt;
&lt;br /&gt;
==== แก้ไข Content Pipeline ให้อ่านไอเทมชนิดที่สามได้ ====&lt;br /&gt;
Map ที่ให้ไปในเกม (ไฟล์ map-01.txt ใน BreakoutContent) สามารถใส่ไอเทมได้ 4 ชนิด (แทนด้วยตัวอักษร 1, 2, 3, 4 ตามลำดับ) แต่ในตอนนี้เกมสามารถอ่านไอเทมได้แค่ชนิด 1 กับ 2 เท่านั้น เนื่องจากใน BreakoutMapReader.cs ในโปรเจค BreakoutMapContentPipeline มีการกำหนดเงื่อนไขดังต่ีอไปนี้&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
Item item = null;&lt;br /&gt;
if (brickFromFile.itemType != 0) //This brick come with its item. load it.&lt;br /&gt;
{&lt;br /&gt;
  switch (brickFromFile.itemType)&lt;br /&gt;
  {&lt;br /&gt;
    case 1: item = new LongBarItem(); break;&lt;br /&gt;
    case 2: item = new MagnetBarItem();  break;                        &lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
เมื่อคุณสร้างคลาสสำหรับไอเทมชนิดนี้เสร็จแล้ว ให้ไปเพิ่ม &amp;lt;tt&amp;gt;case 3&amp;lt;/tt&amp;gt; หรือ &amp;lt;tt&amp;gt;case 4&amp;lt;/tt&amp;gt; ในคำสั่ง switch ข้างบน แล้วเกมก็จะอ่านไอเทมที่คุณสร้างขึ้นมาใหม่ได้&lt;br /&gt;
&lt;br /&gt;
=== 2. เพิ่มไอเทมที่เก็บแล้วผู้เล่นสามารถยิงลูกกระสุนปืนออกจากแป้นได้ (30 คะแนน) ===&lt;br /&gt;
จงสร้างไอเทมชนิดใหม่ ซึ่ีงเมื่อเก็บแล้วลูกแป้นจะเปลี่ยนรูปร่างให้ปลายทั้งสองข้างเป็นสีเขียว เมื่อแป้นอยู่ในสภาพนี้ หากผู้ใช้กดปุ่ม spacebar แล้วแป้นจะยิงลูกกระสุนสีแดงสองลูกออกทางข้างแป้น เมื่อลูกกระสุนกระทบบล็อก &amp;quot;เลือด&amp;quot; (HP) ของบล็อกจะลดลงหนึ่ง เหมือนกับโดนลูกบอลกระทบหนึ่งครั้ง (กล่าวคือถ้าเลือกเหลือ 0 แป้นก็จะถูกทำลายได้) และเมื่อเป็นอยู่ในสถานะนี้ไปสักระยะหนึ่งมันจะกลับคือสู่สภาพเดิม&lt;br /&gt;
&lt;br /&gt;
ในการทำโจทย์ข้อนี้เราแนะนำให้คุณแบ่งการทำงานเป็นสามขั้นตอน ดังนี้&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;สร้าง GameObject สำหรับแทนลูกกระสูน&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* สร้าง subclass ของ [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/interface_breakout_lib_1_1_game_object.html GameObject] ขึ้นมาใหม่ ชื่อ Bullet สำหรับแทนลูกกระสุน&lt;br /&gt;
#* เพิ่มเมธอด &amp;lt;tt&amp;gt;void CheckCollisionWithBullet(Bullet bullet)&amp;lt;/tt&amp;gt; เข้่าใน GameObject แล้ว implement เมธอดนี้ให้ subclass ของ GameObject ทุกคลาส&lt;br /&gt;
#* สร้าง event ชื่อ &amp;lt;tt&amp;gt;BrickHitBullet&amp;lt;/tt&amp;gt; เพื่อแทนเหตุการณ์ลูกกระสุนกระทบบล็อก&lt;br /&gt;
#* สร้างเมธอด &amp;lt;tt&amp;gt;void Visit(BrickHitBullet ev)&amp;lt;/tt&amp;gt; ใน [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/interface_breakout_lib_1_1_event_visitor.html EventVisitor] แล้วเขียนเมธอดนี้ให้ subclass ทุกตัวของ EventVisitor (ในตอนนี้มีสองตัวคือ GameState และ ScoreManager)&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;สร้าง BarType ใหม่&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/class_breakout_lib_1_1_bar_type.html BarType] เป็นคลาสที่ใช้กำหนดพฤติกรรมของแป้นเมื่อมันได้รับไอเทมแบบต่างๆ&lt;br /&gt;
#* ให้สร้าง BarType ใหม่ที่ใช้แทนแป้นเมื่อมันสามารถยิงลูกกระสุนได้&lt;br /&gt;
#* เขียนเมธอด &amp;lt;tt&amp;gt;void 	Control (KeySensor keySensor, GameState gameState)&amp;lt;/tt&amp;gt; ซึ่งรับข้อมูลเข้าทางคีย์บอร์ดจาก KeySensor แล้วควบคุมแป้นตามนั้น ในการเขียนเมธอดนี้คุณจะต้องทำให้&lt;br /&gt;
#** ถ้ามีลูกบอลติดอยู่กับแป้นอยู่ เมื่อกด spacebar (&amp;lt;tt&amp;gt;KeyMapping.LaunchKey&amp;lt;/tt&amp;gt; ให้ยิงลูกบอลออกไปก่อน ให้ดูตัวอย่างวิธีการยิงลูกบอลจากคลาส [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/class_breakout_lib_1_1_magnet_bar_type.html MagnetBarType]&lt;br /&gt;
#** ถ้าไม่มีลูกบอลติดอยู่กับแป้นเลย ให้ยิงลูกกระสุนออกสองลูก&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;สร้าง Item ชนิดใหม่&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* สร้าง subclass ของ Item สำหรับแทนไอเทมชนิดใหม่ แล้วเขียนเมธอด &amp;lt;tt&amp;gt;PutPowerupEffectToBar&amp;lt;/tt&amp;gt; เพื่อเปลี่ยนรูปแบบของแป้นไปเป็นรูปแบบที่ียิงกระสนุได้ แล้วจึงเขียนเมธอด &amp;lt;tt&amp;gt;CancelPowerupEffectToBar&amp;lt;/tt&amp;gt; เพื่อคืน BarType ใ้ห้เป็น [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/class_breakout_lib_1_1_normal_bar_type.html NormalBarType] เมื่อหมดเวลา (ดูวิธีจับเวลาได้ที่ [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/class_breakout_lib_1_1_magnet_bar_type.html MagnetBarType])&lt;br /&gt;
&lt;br /&gt;
ท้ายสุด อย่าลืมแก้ content pipeline ให้อ่านไอเทมชนิดใหม่ีนี้เข้ามาได้ด้วย&lt;br /&gt;
&lt;br /&gt;
==== อนิเมชันของส่วนประกอบต่างๆ ====&lt;br /&gt;
* ลูกกระสุน อยู่ที่ไฟล์ BreakoutLib/Content/bullet.anim&lt;br /&gt;
* แป้นเมื่อยิงปืนได้ อยู่ืที่ไฟล์ BreakoutLib/Content/gun_bar_type.anim&lt;br /&gt;
* ไอเทม อยู่ที่ไฟล์ BreakoutLib/Content/gun_item.anim&lt;br /&gt;
&lt;br /&gt;
=== 3. เพิ่มด่าน (20 คะแนน) ===&lt;br /&gt;
สร้างด่านเพิ่มขึ้นอีกสองด่าน โดยทำการสร้าง map ใหม่ 2 map โดยใช้โปรแกรมสร้าง map ที่ให้ข้างบน (ห้ามใช้ map-02.txt และ map-03.txt ที่ใ้ห้มา) &lt;br /&gt;
&lt;br /&gt;
แก้ไข PlayScene และส่วนประกอบอื่นๆ ของเกมตามที่จำเป็น เพื่อให้หลังจากจบด่านแรกในเกมแล้ว เกมจะไปเริ่มต้นที่ด่านที่สองโดยอัตโนมัติ และทำเช่นเดียวกันกับด่านที่สาม และเมื่อผู้เล่นผ่านด่านที่สามแล้ว ให้แสดงฉากว่าผู้เล่นได้เคลียร์เกมแล้ว&lt;br /&gt;
&lt;br /&gt;
โจทย์ข้อนี้มีวิธีทำสองวิธี&lt;br /&gt;
* สังเกตว่าใน [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/class_breakout_lib_1_1_play_scene.html PlayScene] หนึ่งตัวจะมี map อยู่หนึ่งอัน ดังนั้นหากอยากให้มีหลายด่าน ก็ให้สร้าง PlayScene ขึ้นมาอีก 2 instance โดยให้แต่ละอันใช้ map ที่แตกต่างไป เพื่อให้ PlayScene หนึ่งตัวแทนด่านหนึ่งด่าน (ในวิธีการนี้คุณอาจจะต้องสร้าง scene อื่นๆ เพิ่มเติมเพื่อช่วยในการเปลี่ยนฉากด้วย)&lt;br /&gt;
* ให้มี PlayScene แค่ instance เดียว แต่สร้างคลาสขึ้นมาอีกคลาสหนึ่งที่เก็บลำดับของ map ของทั้งเกมเอาไว้ แล้วให้คลาสนี้ไปเปลี่ยน map ที่ PlayScene ใช้&lt;br /&gt;
&lt;br /&gt;
=== 4. เพิ่มเสียง (20 คะแนน) ===&lt;br /&gt;
เพิ่มเสียงเข้าไปในเกม โดยให้มีเสียงต่อไปนี้ (เสียงละ 2 คะแนน)&lt;br /&gt;
* เพลงแบคกราวนด์&lt;br /&gt;
* เสียงบอลชนแป้น&lt;br /&gt;
* เสียงบอลชนกำแพง&lt;br /&gt;
* เสียงบอลชนบล็อก&lt;br /&gt;
* เสียงบล็อกโดนทำลาย&lt;br /&gt;
* เสียงไอเทมชนแป้น&lt;br /&gt;
* เสียงเวลาแป้นตาย&lt;br /&gt;
* เสียงเวลายิงลูกกระสุน&lt;br /&gt;
* เสียงเวลาลูกกระสุนกระทบแป้น&lt;br /&gt;
* เพลงสั้นๆ ที่เล่นเวลาผู้เล่นผ่านด่าน&lt;br /&gt;
&lt;br /&gt;
วิธีการที่ง่ายที่สุดในการทำโจทย์ข้อนี้คือการสร้างคลาส SoundSystem ซึ่งสืบทอดมาจาก [http://theory.cpe.ku.ac.th/~pramook/418383/homework-02/doc/html/interface_breakout_lib_1_1_event_visitor.html EventVisitor] เหมือนกับโ้ค้ดตัวอย่างในการบรรยายครั้งที่เกี่ยวกับการสร้างเสียง โดยถ้าคุณอยากให้เหตุำการณ์ใดมีเสียงก็ให้สร้าง subclass ของ Event สำหรับเหตุการณ์นั้นมา แล้วเขียนเมธอด &amp;lt;tt&amp;gt;Visit&amp;lt;/tt&amp;gt; ของ SoundSystem ให้เล่นเสียงที่คุณต้องการ&lt;br /&gt;
&lt;br /&gt;
=== 5. ทำให้เกมสวยงาม (10 คะแนน) ===&lt;br /&gt;
เปลี่ยนหน้า Title, หน้า Game Over, หน้าจอระหว่างเล่นเกม, ฯลฯ ให้เป็นไปตามที่คุณชอบ&lt;/div&gt;</summary>
		<author><name>Cardcaptor</name></author>
		
	</entry>
</feed>