All Downloads are FREE. Search and download functionalities are using the official Maven repository.

games.rednblack.h2d.common.command.ReplaceSpriteAnimationCommandBuilder Maven / Gradle / Ivy

The newest version!
package games.rednblack.h2d.common.command;

import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.utils.Array;
import games.rednblack.h2d.common.MsgAPI;
import games.rednblack.puremvc.Facade;

public class ReplaceSpriteAnimationCommandBuilder {

    private Object[] payload;

    public void begin(int forEntity) {
        payload = new Object[3];
        payload[0] = forEntity;
    }

    public void setAnimationName(String name) {
        payload[1] = name;
    }

    public void setRegion(Array regions) {
        payload[2] = regions;
    }

    public void execute(Facade facade) {
        facade.sendNotification(MsgAPI.ACTION_REPLACE_SPRITE_ANIMATION_DATA, payload);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy