mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 14:10:55 +03:00
This follows the style guide: - https://docs.godotengine.org/en/stable/tutorials/best_practices/project_organization.html#style-guide For reference, a documentation PR exists to update references to the demo.
11 lines
258 B
GDScript
11 lines
258 B
GDScript
extends RigidBody2D
|
|
|
|
func _ready():
|
|
$AnimatedSprite2D.play()
|
|
var mob_types = Array($AnimatedSprite2D.sprite_frames.get_animation_names())
|
|
$AnimatedSprite2D.animation = mob_types.pick_random()
|
|
|
|
|
|
func _on_VisibilityNotifier2D_screen_exited():
|
|
queue_free()
|