extend("fiskheroes:hero_basic");
loadTextures({
    "layer1": "tgheroes:weapon_x/logan/wolverine_layer1",
    "layer2": "tgheroes:weapon_x/logan/wolverine_layer2",
	"claw": "tgheroes:weapon_x/claw",
	"claw2": "tgheroes:weapon_x/claw2"
});

var utils = implement("fiskheroes:external/utils");

var claw;
var claw2;

function initEffects(renderer) {


	claw = renderer.createEffect("fiskheroes:shield");
    claw.texture.set("claw");
    claw.anchor.set("rightArm");
	
    claw2 = renderer.createEffect("fiskheroes:shield");
    claw2.texture.set("claw2");
    claw2.anchor.set("leftArm");

	
}


function render(entity, renderLayer, isFirstPersonArm) {

	
			claw.unfold = entity.getInterpolatedData("fiskheroes:blade_timer");
			claw.render();
			
			claw2.unfold = entity.getInterpolatedData("fiskheroes:blade_timer");
			claw2.render();


			var f = Math.min(claw.unfold * 5, 1);
			claw.setOffset(2.9 + 0.1 * f, 6.0 + 3.0 * f, -1.0);
			claw.render();
			claw.setRotation(0, 90, 0);

			var f2 = Math.min(claw2.unfold * 5, 1);
			claw.setOffset(2.9 + 0.1 * f, 6.0 + 3.0 * f, 1.0);
			claw.render();
			claw.setRotation(0, 90, 0);
			
			var f3 = Math.min(claw2.unfold * 5, 1);
			claw.setOffset(2.9 + 0.1 * f, 6.0 + 3.0 * f, 0.0);
			claw.render();
			claw.setRotation(0, 90, 0);
			
			var f4 = Math.min(claw.unfold * 5, 1);
			claw2.setOffset(-2.9 - 0.1 * f, 6.0 + 3.0 * f, -1.0);
			claw2.render();
			claw2.setRotation(0, 90, 0);

			var f5 = Math.min(claw2.unfold * 5, 1);
			claw2.setOffset(-2.9 - 0.1 * f, 6.0 + 3.0 * f, 0.0);
			claw2.render();
			claw2.setRotation(0, 90, 0);
			
			var f6 = Math.min(claw2.unfold * 5, 1);
			claw2.setOffset(-2.9 - 0.1 * f, 6.0 + 3.0 * f, 1.0);
			claw2.render();
			claw2.setRotation(0, 90, 0);
	
	
}
