Example usage for com.badlogic.gdx.scenes.scene2d Action getActor

List of usage examples for com.badlogic.gdx.scenes.scene2d Action getActor

Introduction

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

Prototype

public Actor getActor() 

Source Link

Usage

From source file:com.vlaaad.dice.managers.SoundManager.java

License:Open Source License

private void replaceAction(Music music, Action action) {
    Action prev = actions.put(music, action);
    if (prev != null && prev.getActor() != null)
        prev.getActor().removeAction(prev);
}

From source file:hku.fyp14017.blencode.content.BroadcastHandler.java

License:Open Source License

private static void addOrRestartAction(Look look, Action action) {
    if (action.getActor() == null) {
        if (!look.getActions().contains(action, false)) {
            look.addAction(action);/*from w ww .ja v  a2s .  c  o  m*/
        }
    } else {
        if (!Look.actionsToRestartContains(action)) {
            Look.actionsToRestartAdd(action);
        }
    }
}

From source file:hku.fyp14017.blencode.content.BroadcastHandler.java

License:Open Source License

private static boolean handleAction(Action action, Script scriptOfAction) {
    Sprite spriteOfAction = scriptSpriteMap.get(scriptOfAction);
    String actionToHandle = action.toString() + Constants.ACTION_SPRITE_SEPARATOR + spriteOfAction.getName()
            + spriteOfAction.getScriptIndex(scriptOfAction);

    if (!actionsToRestartMap.containsKey(actionToHandle)) {
        return false;
    }/* w ww. ja v a  2s. c om*/
    for (String actionString : actionsToRestartMap.get(actionToHandle)) {
        Action actionOfLook = stringActionMap.get(actionString);
        if (actionOfLook == null) {
            Log.d(TAG, "Action of look is skipped with action: " + actionString
                    + ". It is probably a BroadcastNotify-Action that must not be restarted yet");
            continue;
        }
        if (actionOfLook.getActor() == null) {
            return false;
        }
        Look.actionsToRestartAdd(actionOfLook);
    }
    return true;
}