This repository has been archived on 2023-05-28. You can view files and clone it, but cannot push or open issues or pull requests.
YokaiSurvive/GODOT/Ennemi.gd
2021-01-03 11:05:02 +01:00

13 lines
407 B
GDScript

extends RigidBody2D
export var min_vitesse = 175
export var max_vitesse = 225
export var type_ennemi = "None"
func _ready():
var type = $AnimatedSprite.frames.get_animation_names() # liste des animations
$AnimatedSprite.animation = type[randi() % type.size()] # choix d'une animation parmis la liste
type_ennemi = $AnimatedSprite.animation
func _on_VisibilityNotifier2D_screen_exited():
queue_free()