Browse Source

Update your_first_game.rst (#3603)

* Update C# code in your_first_game.rst
robertsonb93 5 years ago
parent
commit
d2614dca05
1 changed files with 1 additions and 0 deletions
  1. 1 0
      getting_started/step_by_step/your_first_game.rst

+ 1 - 0
getting_started/step_by_step/your_first_game.rst

@@ -629,6 +629,7 @@ choose one of the three animation types:
 
     public override void _Ready()
     {
+        var _mobTypes = GetNode<AnimatedSprite>("AnimatedSprite").Frames.GetAnimationNames();
         GetNode<AnimatedSprite>("AnimatedSprite").Animation = _mobTypes[_random.Next(0, _mobTypes.Length)];
     }