extends Node

const LYR_MASK_DEFAULT := 1 
const LYR_MASK_PLAYER := 1 << 1
const LYR_MASK_ENEMY := 1 << 2
const LYR_MASK_GRAPPLABLE := 1 << 3
const LYR_MASK_GRAPPLE :=  1 << 4
const LYR_MASK_BULLET :=  1 << 5

const LYR_PLAYER := 2
const LYR_ENEMY := 4
const LYR_GRAPPLABLE := 8


func jiggle(node:CanvasItem, start_scale_percentage:float = 1.1, duration:float = 0.25):
	#if jiggle_sound:
		#jiggle_sound.play()
	
	var tw:Tween = node.create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_ELASTIC)
	var original_scale:Vector2 = node.scale
	node.scale= original_scale * start_scale_percentage
	tw.tween_property(node, "scale", original_scale, duration)
