11 lines
238 B
GDScript
11 lines
238 B
GDScript
extends Area2D
|
|
|
|
onready var anim_player: AnimationPlayer = get_node("AnimationPlayer")
|
|
|
|
export var scoreValue: = 100
|
|
|
|
func _on_body_entered(body: Node) -> void:
|
|
GlobalState.score += scoreValue
|
|
anim_player.play("fade_out")
|
|
queue_free()
|