extends KinematicBody2D

var brokena = 1
var brake
func _process(delta):
	if brokena == 0:
		brokena = brokena + 1
	if brokena == 7:
		brokena = brokena - 1	
	if Glob.hit == "Armor4":
		if Input.is_action_just_pressed("smack"):
			brokena = brokena - 1
	if Glob.rng == 4:
		brokena = brokena + 1
		Glob.rng = 0
	if brokena == 1:
		brake = "Unbroken"
	if brokena == 2:
		brake = "Broken1"
	if brokena == 3:
		brake = "Broken2"
	if brokena == 4:
		brake = "Broken3"
	if brokena == 5:
		brake = "Broken4"
	if brokena == 6:
		Glob.hitnum = Glob.hitnum + 1
		brokena = 5
	$AnimatedSprite.play(brake)