浏览代码

Fix typos in FPS Tutorial Part 2 (#4548)

This removes a few unneeded semicolons, and fixes a misspelled variable name.
Atul Varma 4 年之前
父节点
当前提交
bf32b02183
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      tutorials/3d/fps_tutorial/part_two.rst

+ 4 - 4
tutorials/3d/fps_tutorial/part_two.rst

@@ -135,7 +135,7 @@ Add the following code to ``AnimationPlayer_Manager.gd``:
         elif current_state == "Rifle_equip":
             set_animation("Rifle_idle")
         elif current_state == "Rifle_idle":
-            pass;
+            pass
         elif current_state == "Rifle_fire":
             set_animation("Rifle_idle")
         elif current_state == "Rifle_unequip":
@@ -1106,7 +1106,7 @@ Add the following code:
 
 Let's go over what's happening here:
 
-The first thing we do is make sure we've received input to change weapons. We do this by making sure ``changing_weapons`` is ``true``.
+The first thing we do is make sure we've received input to change weapons. We do this by making sure ``changing_weapon`` is ``true``.
 
 Next we define a variable (``weapon_unequipped``) so we can check whether the current weapon has been successfully unequipped or not.
 
@@ -1178,13 +1178,13 @@ Now we need to add this code:
 
     extends RigidBody
 
-    const BASE_BULLET_BOOST = 9;
+    const BASE_BULLET_BOOST = 9
 
     func _ready():
         pass
 
     func bullet_hit(damage, bullet_global_trans):
-        var direction_vect = bullet_global_trans.basis.z.normalized() * BASE_BULLET_BOOST;
+        var direction_vect = bullet_global_trans.basis.z.normalized() * BASE_BULLET_BOOST
 
         apply_impulse((bullet_global_trans.origin - global_transform.origin).normalized(), direction_vect * damage)