extends Node2D


# Declare member variables here. Examples:
# var a = 2
# var b = "text"
export(Texture) var text
export(Texture) var text1
export(Texture) var text2
export(Texture) var text3
export(Texture) var text4

export var anim = 'walk'
export var node = 'AnimationPlayer'
# Called when the node enters the scene tree for the first time.
func _ready():
	get_node(node).play(anim)
	if text != null:
		changer(self)
		$body/head/Sprite2.texture = text1
		$body/head/soldieremotions.texture = text2
		$body/head/Sprite3.texture = text3
		$body/gun/handle/Sprite.texture = text4
	pass # Replace with function body.

func changer(arg):
	for i in arg.get_children():
		changer(i)
		if 'texture' in i: i.texture = text
