Exemplo n.º 1
0
        public override void Draw(Vector2 Position, Vector2 Size)
        {
            Render.DrawSprite(MyTexture, Position, Size, 0, TeamInfo.HudColors[ParentShip.GetTeam()]);
            Vector2 SliceSize = TargetSliceSize * Size;

            Game1.spriteBatch.Draw(SliceTexture, Position - SliceSize / 2, new Rectangle(0, 0, (int)(
                                                                                             SliceTexture.Width * Math.Floor(ParentShip.HealthMult() * 50) / 50f), SliceTexture.Height), TeamInfo.HudColors[ParentShip.GetTeam()],
                                   0, Vector2.Zero, SliceSize / new Vector2(SliceTexture.Width, SliceTexture.Height), SpriteEffects.None, 0);
            base.Draw(Position, Size);
        }