package de.frajul.endlessroll.entities.tools;

import de.frajul.endlessroll.data.Vector;
import de.frajul.endlessroll.entities.DestroyEffect;
import de.frajul.endlessroll.entities.Player;
import de.frajul.endlessroll.entities.collision.geometry.Geometry;
import de.frajul.endlessroll.main.game.Timer;

/**
 * Created by Julian on 02.10.2017.
 */

public class PowerMushroom extends Tool {

    public PowerMushroom(Vector position) {
        super(ToolType.POWER_MUSHROOM, position, .35f, .3f, true, true);
        animation.disable();
    }

    @Override
    public void onPlayerCollision(Player player, Timer timer) {
        player.startSuperPower((long) ToolType.POWER_MUSHROOM.getCurrentUpgradeValue(ToolUpgradeType.DURATION));
        super.destroy(DestroyEffect.ENERGY_COLLECT);
    }

    @Override
    protected Geometry createWorldCollisionBounds() {
        return this;
    }

    @Override
    protected Geometry createPlayerCollisionBounds() {
        return this;
    }
}
