extend("fiskheroes:hero_basic");
loadTextures({
    "layer1": "pkg:speedster_layer1",
    "eyes": "pkg:speedster_eyes"
});
var utils = implement("fiskheroes:external/utils");

var vibration;

function init(renderer) {
    parent.init(renderer);
}
function initAnimations(renderer) {
    parent.initAnimations(renderer);
    addAnimation(renderer, "basic.CHARGED_BEAM", "fiskheroes:aiming").setData((entity, data) => data.load(Math.max(entity.getInterpolatedData("fiskheroes:beam_charge") * 5 - 4, 0)));
    addAnimation(renderer, "WALL_RUN", "pkg:wall_running").setData((entity, data) => {
        var input_rotate = entity.getInterpolatedData("pkg:dyn/climb") > 0 ? 1 : 0;
        data.load(0, entity.getInterpolatedData("pkg:dyn/climb") * 2);
        data.load(1, entity.getInterpolatedData("pkg:dyn/climb") * 2);
        data.load(2, input_rotate); // rotation data var doesnt work for this
        data.load(4, -(input_rotate / 3.5));

    })
}
function initEffects(renderer) {
    utils.bindTrail(renderer, "pkg:lightning_pink");
    utils.bindBeam(renderer, "fiskheroes:energy_manipulation", "fiskheroes:energy_discharge", "rightArm", 0xFF6BFF, [
        { "firstPerson": [-2.5, 0.0, -7.0], "offset": [-0.5, 19.0, -12.0], "size": [1.5, 1.5] }
    ]);
}

function render(entity, renderLayer, isFirstPersonArm) {
}
