public void addActor(Actor actor, Location location) { actor.location = location; _actors.Add( actor); }
public void bindActor(Actor actor) { this.actor = actor; alternate = null; }
private void drawHealthBar(SpriteBatch spriteBatch, Actor actor, Rectangle destRect) { const int hpBarHeight = 3; destRect.Y = destRect.Bottom - hpBarHeight; destRect.Height = hpBarHeight; spriteBatch.Draw(Game1.blankTexture, destRect, Color.Gray); double ratio = 1.0 *actor.hp/actor.maxHp; destRect.Width = (int)(destRect.Width *ratio); spriteBatch.Draw(Game1.blankTexture, destRect, Color.Green); }
public abstract void useItem(Actor actor);