func Item_anim(item):
match item:
"poke_ball":
res.position = player.global_position
res.texture = load("res://assets/items/poke_ball.png")
res.scale = Vector2(2,2)
res.show()
var tween = get_tree().create_tween()
tween.tween_property(res,"position",enemy.global_position,1)
var tweene = get_tree().create_tween()
tweene.tween_property(res,"rotation",360,1)
await get_tree().create_timer(1).timeout
print(enemy.frame_coords)
var x = enemy.get_width()
x = x / 2
var y = enemy.get_height()
y = y / 2
res.hide()
await get_tree().create_timer(.2).timeout
res.position = Vector2(x,y)
res.show()
var tweenw = get_tree().create_tween()
tweenw.tween_property(res,"position",res.position.y + 20,1)
await get_tree().create_timer(1).timeout
res.hide()
res.scale = Vector2(1,1)
see what im going for