Skip to content

Commit 7afd442

Browse files
authored
Updated tutorial to fix phaserjs#2642
Tutorial was missing a tiny piece of code that was found in the parts
1 parent f2daaec commit 7afd442

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

resources/tutorials/02 Making your first game/tutorial.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,12 @@ <h3>Starshine</h3>
240240

241241
It's time to give our little game a purpose. Let's drop a sprinkling of stars into the scene and allow the player to collect them. To achieve this we'll create a new Group called 'stars' and populate it. In our create function we add the following code (this can be seen in part8.html):
242242

243-
<pre class="lang:js decode:true"> stars = game.add.group();
243+
<pre class="lang:js decode:true">
244+
// Finally some stars to collect
245+
stars = game.add.group();
246+
247+
// We will enable physics for any star that is created in this group
248+
stars.enableBody = true;
244249

245250
// Here we'll create 12 of them evenly spaced apart
246251
for (var i = 0; i &lt; 12; i++)

0 commit comments

Comments
 (0)