瀏覽代碼

Update 2d_sprite_animation.rst

Corrected the C# code from the example in the 'Controlling the animation' section, fixing the class name used by the generic method GetNode<T>(), as well as the string parameter.

(cherry picked from commit 4c6e4e7d1ee1ccd1af164a93287f7b6b60509f1e)
C. Peña 1 年之前
父節點
當前提交
e2a8bd7d07
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tutorials/2d/2d_sprite_animation.rst

+ 1 - 1
tutorials/2d/2d_sprite_animation.rst

@@ -101,7 +101,7 @@ released.
 
         public override void _Ready()
         {
-            _animatedSprite = GetNode<AnimatedSprite>("AnimatedSprite");
+            _animatedSprite = GetNode<AnimatedSprite2D>("AnimatedSprite2D");
         }
 
         public override _Process(float _delta)