Example usage for com.badlogic.gdx.scenes.scene2d Actor clearActions

List of usage examples for com.badlogic.gdx.scenes.scene2d Actor clearActions

Introduction

In this page you can find the example usage for com.badlogic.gdx.scenes.scene2d Actor clearActions.

Prototype

public void clearActions() 

Source Link

Document

Removes all actions on this actor.

Usage

From source file:broken.shotgun.throwthemoon.stages.GameStage.java

License:Open Source License

private void clearAllEnemies() {
    for (Actor entity : getActors()) {
        if (entity instanceof Enemy) {
            entity.clearActions();
            entity.remove();/*  ww  w .j  a v a 2 s.com*/
        }
    }
}

From source file:com.bagon.matchteam.mtx.scene2d.effects.EffectCreator.java

License:Apache License

private static void removeActor(Group group, Actor actor) {
    if (group != null && actor != null) {
        actor.clearActions();
        String actorName = actor.getName();
        if (group.removeActor(actor)) {
            MtxLogger.log(logActive, true, logTag, "Actor removed! (Name: " + actorName + ")");
        } else {/*from   w  ww  . j a va 2s .  c  o  m*/
            MtxLogger.log(logActive, true, logTag, "Actor not removed! (Name: " + actorName + ")");
        }
    }
}

From source file:com.gcq.fivesecond.layer.PlayerRoundLayer.java

License:Apache License

@Override
public boolean removeActor(Actor actor) {
    super.removeActor(actor);

    actor.clearActions();

    return true;//from   w  ww  . j  a v  a 2 s.c om
}

From source file:com.gcq.fivesecond.layer.TargetRoundDiscLayer.java

License:Apache License

/**
 * We override the removeActor to ensure we clear actions and re-pool item.
 * //  w  w  w .ja v  a  2s.co m
 */
@Override
public boolean removeActor(Actor actor) {
    super.removeActor(actor);
    actor.clearActions();
    pool.free((TargetRoundDiscSprite) actor);
    return true;
}

From source file:com.mk.apps.superm.mtx.effects.EffectCreator.java

License:Apache License

private static void removeActor(Stage stage, Actor actor) {
    if (stage != null && actor != null) {
        actor.clearActions();
        String actorName = actor.getName();
        if (stage.getRoot().removeActor(actor)) {
            MtxLogger.log(logActive, true, logTag, "Actor removed! (Name: " + actorName + ")");
        } else {// w w  w.j a v  a  2 s .com
            MtxLogger.log(logActive, true, logTag, "Actor not removed! (Name: " + actorName + ")");
        }
    }
}

From source file:com.netthreads.gdx.app.layer.AsteroidLayer.java

License:Apache License

/**
 * We override the removeActor to ensure we clear actions and re-pool item.
 * /*from   w  ww .  j a v  a2  s .c  o m*/
 */
@Override
public boolean removeActor(Actor actor) {
    super.removeActor(actor);

    actor.clearActions();

    pool.free((AsteroidSprite) actor);

    return true;
}

From source file:com.netthreads.gdx.app.layer.ExplosionLayer.java

License:Apache License

/**
 * We override the removeActor to ensure we clear actions and re-pool item.
 * // w  w  w.  j  a  va  2s  . c o  m
 */
@Override
public boolean removeActor(Actor actor) {
    super.removeActor(actor);

    actor.clearActions();

    pool.free((ExplosionSprite) actor);

    return true;
}

From source file:com.netthreads.gdx.app.layer.PulseLayer.java

License:Apache License

/**
 * We override the removeActor to ensure we clear actions and re-pool item.
 * /*from w  w  w  .  java 2  s  . co m*/
 */
@Override
public boolean removeActor(Actor actor) {
    super.removeActor(actor);

    actor.clearActions();

    pool.free((PulseSprite) actor);

    return true;
}

From source file:com.netthreads.gdx.app.layer.SimulationLayer.java

License:Apache License

/**
 * Handle actor being removed from layer.
 * /*from   w  w  w  .java  2  s  .c om*/
 * NOTE: We can call clearActions from here as it is not called from within an action.
 * 
 * @return Success.
 * 
 */
@Override
public boolean removeActor(Actor actor) {
    super.removeActor(actor);

    // This will call 'finish' on Actor associated actions.
    actor.clearActions();

    if (actor instanceof BallSprite) {
        BallSprite ballSprite = (BallSprite) actor;
        pool.free(ballSprite);
    }

    return true;
}

From source file:com.ridiculousRPG.ui.ActorsOnStageService.java

License:Apache License

public void removeActor(Actor actor) {
    synchronized (syncObj) {
        actor.clearActions();
        actor.remove();
    }
}