class BonusAttack extends Bonus {
    constructor(name, scene, x, y, value) {
        super(name, scene, x, y, 'bonusAttack', value);
    }

    useOn(robot) {
        let oldSpeed = robot.speed;
        robot.setSpeed(oldSpeed + this.value);
        this.scene.time.addEvent({delay: this.time, callback: robot.setSpeed(oldSpeed)});
        this.destroy();
    }
}