extends RigidBody2D

var SPEED = 300.0
var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")

func _ready():
    var angle = get_rotation()
    linear_velocity = Vector2(cos(angle) * SPEED, sin(angle) * SPEED)


func _on_capture_area_mouse_entered():
    $"../../Economy".add(1)
    $Coin.play()
    hide()
    await $Coin.finished
    get_parent().remove_child(self)
