Bladeren bron

Merge pull request #544 from cbscribe/master

Update game tutorial: clarifications
Chris Bradfield 7 jaren geleden
bovenliggende
commit
932947998e
2 gewijzigde bestanden met toevoegingen van 6 en 3 verwijderingen
  1. BIN
      learning/step_by_step/img/custom_font2.png
  2. 6 3
      learning/step_by_step/your_first_game.rst

BIN
learning/step_by_step/img/custom_font2.png


+ 6 - 3
learning/step_by_step/your_first_game.rst

@@ -346,6 +346,10 @@ This time, we have 3 animations: "fly", "swim", and "walk". Set the ``Playing``
 property in the Inspector to "On" and adjust the "Speed (FPS)" setting as shown below.
 property in the Inspector to "On" and adjust the "Speed (FPS)" setting as shown below.
 We'll select one of these randomly so that the mobs will have some variety.
 We'll select one of these randomly so that the mobs will have some variety.
 
 
+In Godot's 2D space, a heading of zero degrees points to the right. However, our mob art
+is drawn pointing upward. To correct for this, set the ``AnimatedSprite``'s "Rotation Deg"
+property to ``90``.
+
 .. image:: img/mob_animations.gif
 .. image:: img/mob_animations.gif
 
 
 As in the ``Player`` scene, add a ``CapsuleShape2D`` for the
 As in the ``Player`` scene, add a ``CapsuleShape2D`` for the
@@ -522,8 +526,7 @@ Note that a new instance must be added to the scene using
         mob.position = $"MobPath/MobSpawnLocation".position
         mob.position = $"MobPath/MobSpawnLocation".position
         # add some randomness to the direction
         # add some randomness to the direction
         direction += rand_range(-PI/4, PI/4)
         direction += rand_range(-PI/4, PI/4)
-        # textures are oriented pointing up, so add 90 degrees
-        mob.rotation = direction + PI/2
+        mob.rotation = direction
         # choose the velocity
         # choose the velocity
         mob.set_linear_velocity(Vector2(rand_range(mob.MIN_SPEED, mob.MAX_SPEED), 0).rotated(direction))
         mob.set_linear_velocity(Vector2(rand_range(mob.MIN_SPEED, mob.MAX_SPEED), 0).rotated(direction))
 
 
@@ -651,7 +654,7 @@ has been pressed.
 
 
 This function is called when we want to display a message
 This function is called when we want to display a message
 temporarily, such as "Get Ready". On the ``MessageTimer``, set the
 temporarily, such as "Get Ready". On the ``MessageTimer``, set the
-``Wait Time`` to ``2`` and check ``One Shot``.
+``Wait Time`` to ``2`` and set the ``One Shot`` property to "On".
 
 
 ::
 ::