Ejemplo n.º 1
0
 public void addActor(Actor actor, Location location)
 {
     actor.location = location;
     _actors.Add( actor);
 }
Ejemplo n.º 2
0
        public void bindActor(Actor actor)
        {
            this.actor = actor;

            alternate = null;
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 public abstract void useItem(Actor actor);