mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-07 02:12:07 +03:00
Update 04.creating_the_enemy.rst
This commit is contained in:
@@ -108,8 +108,8 @@ and randomly choose one of the three animation types:
|
||||
.. code-tab:: gdscript GDScript
|
||||
|
||||
func _ready():
|
||||
$AnimatedSprite2D.playing = true
|
||||
var mob_types = $AnimatedSprite2D.frames.get_animation_names()
|
||||
$AnimatedSprite2D.play()
|
||||
var mob_types = $AnimatedSprite2D.get_sprite_frames().get_animation_names()
|
||||
$AnimatedSprite2D.animation = mob_types[randi() % mob_types.size()]
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
Reference in New Issue
Block a user