Mob.gd 250 B

123456789101112
  1. extends RigidBody2D
  2. export (int) var MIN_SPEED
  3. export (int) var MAX_SPEED
  4. var mob_types = ["walk", "swim", "fly"]
  5. func _ready():
  6. $AnimatedSprite.animation = mob_types[randi() % mob_types.size()]
  7. func _on_Visibility_screen_exited():
  8. queue_free()