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

            alternate = null;
        }
Exemple #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);
        }
Exemple #4
0
 public abstract void useItem(Actor actor);