extends Position2D

# 玩家可以捡取的游戏道具
class_name PlayerProps

# 变更的属性
export(String,"yellow_key","blue_key","red_key","hp","atk","def") var update_property : String = "yellow_key"
# 变更的内容
export var update_value : int = 1

func _on_Area2D_body_entered(body):
	var levels_manager = $"/root/Main/Level" as LevelsManager
	var player = levels_manager.get_current_level_instance().get_player()
	player[update_property] += update_value
	queue_free()
