001package squidpony.squidgrid.gui.gdx;
002
003import com.badlogic.gdx.scenes.scene2d.Actor;
004import com.badlogic.gdx.scenes.scene2d.ui.Label;
005
006/**
007 * Created by Tommy Ettinger on 7/22/2015.
008 */
009public class AnimatedEntity {
010    public Actor actor;
011    public int gridX, gridY;
012    public boolean animating = false;
013    public boolean doubleWidth = false;
014    public AnimatedEntity(Actor actor, int x, int y)
015    {
016        this.actor = actor;
017        this.gridX = x;
018        this.gridY = y;
019    }
020    public AnimatedEntity(Actor actor, int x, int y, boolean doubleWidth)
021    {
022        this.actor = actor;
023        this.gridX = x;
024        this.gridY = y;
025        this.doubleWidth = doubleWidth;
026    }
027    public void setText(String text)
028    {
029        if(actor.getClass() == Label.class)
030        {
031            ((Label)actor).setText(text);
032        }
033    }
034}