@@ -0,0 +1,3402 @@
+package com.badlogic.gdx.scenes.scene2d.ui;%0A%0Aimport com.badlogic.gdx.files.FileHandle;%0Aimport com.badlogic.gdx.graphics.g2d.Batch;%0Aimport com.badlogic.gdx.graphics.g2d.ParticleEffect;%0Aimport com.badlogic.gdx.graphics.g2d.TextureAtlas;%0Aimport com.badlogic.gdx.scenes.scene2d.Actor;%0Aimport com.badlogic.gdx.utils.Disposable;%0A%0A/**%0A * ParticleEffectActor holds an %7B@link ParticleEffect%7D to use in Scene2d applications.%0A * The particle effect is positioned at 0, 0 in the ParticleEffectActor. Its bounding box%0A * is not limited to the size of this actor.%0A */%0Apublic class ParticleEffectActor extends Actor implements Disposable %7B%0A    private final ParticleEffect particleEffect;%0A    protected float lastDelta;%0A    protected boolean isRunning;%0A    protected boolean ownsEffect;%0A    private boolean resetOnStart;%0A    private boolean autoRemove;%0A%0A    public ParticleEffectActor(ParticleEffect particleEffect, boolean resetOnStart) %7B%0A        super();%0A        this.particleEffect = particleEffect;%0A        this.resetOnStart = resetOnStart;%0A    %7D%0A%0A    public ParticleEffectActor(FileHandle particleFile, TextureAtlas atlas) %7B%0A        super();%0A        particleEffect = new ParticleEffect();%0A        particleEffect.load(particleFile, atlas);%0A        ownsEffect = true;%0A    %7D%0A%0A    public ParticleEffectActor(FileHandle particleFile, FileHandle imagesDir) %7B%0A        super();%0A        particleEffect = new ParticleEffect();%0A        particleEffect.load(particleFile, imagesDir);%0A        ownsEffect = true;%0A    %7D%0A%0A    @Override%0A    public void draw(Batch batch, float parentAlpha) %7B%0A        particleEffect.setPosition(getX(), getY());%0A        if (lastDelta %3E 0) %7B%0A            particleEffect.update(lastDelta);%0A            lastDelta = 0;%0A        %7D%0A        if (isRunning) %7B%0A            particleEffect.draw(batch);%0A            isRunning = !particleEffect.isComplete();%0A        %7D%0A    %7D%0A%0A    @Override%0A    public void act(float delta) %7B%0A        super.act(delta);%0A        // don't do particleEffect.update() here - the correct position is set  just while we%0A        // are in draw() method. We save the delta here to update in draw()%0A        lastDelta += delta;%0A%0A        if (autoRemove && particleEffect.isComplete()) %7B%0A            remove();%0A        %7D%0A    %7D%0A%0A    public void start() %7B%0A        isRunning = true;%0A        if (resetOnStart) %7B%0A            particleEffect.reset(false);%0A        %7D%0A        particleEffect.start();%0A    %7D%0A%0A    public boolean isResetOnStart() %7B%0A        return resetOnStart;%0A    %7D%0A%0A    public ParticleEffectActor setResetOnStart(boolean resetOnStart) %7B%0A        this.resetOnStart = resetOnStart;%0A        return this;%0A    %7D%0A%0A    public boolean isAutoRemove() %7B%0A        return autoRemove;%0A    %7D%0A%0A    public ParticleEffectActor setAutoRemove(boolean autoRemove) %7B%0A        this.autoRemove = autoRemove;%0A        return this;%0A    %7D%0A%0A    public boolean isRunning() %7B%0A        return isRunning;%0A    %7D%0A%0A    public ParticleEffect getEffect() %7B%0A        return this.particleEffect;%0A    %7D%0A%0A    @Override%0A    protected void scaleChanged() %7B%0A        super.scaleChanged();%0A        particleEffect.scaleEffect(getScaleX(), getScaleY(), getScaleY());%0A    %7D%0A%0A    public void cancel() %7B%0A        isRunning = true;%0A    %7D%0A%0A    public void allowCompletion() %7B%0A        particleEffect.allowCompletion();%0A    %7D%0A%0A    @Override%0A    public void dispose() %7B%0A        if (ownsEffect) %7B%0A            particleEffect.dispose();%0A        %7D%0A    %7D%0A%0A%7D

Add a ParticleEffectActor (#6388)