BasicEnemy.gd 242 B

12345678910
  1. extends Enemy
  2. func _physics_process(delta: float) -> void:
  3. handle_movement(delta)
  4. func handle_movement(delta: float) -> void:
  5. apply_enemy_gravity(delta)
  6. if is_on_floor():
  7. velocity.x = lerpf(velocity.x, 0, delta * 10)
  8. move_and_slide()