extends Node2D

onready var global: Node = get_node("/root/Global")

func _on_Bird_item_used(item_id):
	var inv = global.inventory
	if item_id == inv.Items.cheese:
		if inv.remove_item(item_id):
			var anim: AnimationPlayer = global.player.animation_player
			anim.play("HeadScratch")
			global.game_vars["cheese_used"] = true
	elif item_id == inv.Items.note:
		if inv.remove_item(item_id):
			var anim: AnimationPlayer = global.player.animation_player
			anim.play("Victory")
			global.game_vars["note_used"] = true
