瀏覽代碼

Merge pull request #544 from cbscribe/master

Update game tutorial: clarifications
Chris Bradfield 7 年之前
父節點
當前提交
932947998e
共有 2 個文件被更改,包括 6 次插入3 次删除
  1. 二進制
      learning/step_by_step/img/custom_font2.png
  2. 6 3
      learning/step_by_step/your_first_game.rst

二進制
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.
 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
 
 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
         # add some randomness to the direction
         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
         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
 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".
 
 ::