extends CollisionShape2D_StateReceiver


# Declare member variables here. Examples:
# var a = 2
# var b = "text"


# Called when the node enters the scene tree for the first time.
func _ready():
	pass # Replace with function body.


func _state_physics_process_attack_sword():
	match current_state.animation_frame:
		2:
			transform.origin = Vector2(0,-17)
			set_deferred("disabled", false)
		3,4:
			transform.origin = Vector2(20,0)
		5: 
			transform.origin = Vector2(20,10)

var org_extents: Vector2
func _state_physics_process_attack_punch():
	match current_state.animation_frame:
		4,5:
			transform.origin = Vector2(22,-1)
			if shape is RectangleShape2D:
				shape.extents.x = 8
			set_deferred("disabled", false)
		_: 
			set_deferred("disabled", true)

func _on_state_change_attack_sword():
	print ("<---- Hey you called me to Hurt Someone!")


