Example #1
0
        public override void Draw(SpriteBatch spritebatch)
        {
            // spritebatch.End();

            spritebatch.Begin();
            if (ListCard.Count != 0)
            {
                //if (Sprite != null)
                //    this.Sprite = ListCard.First.Value.s_BackSide;
                for (int i = 0; i <= Math.Min(ListCard.Count / 4, 10); i++)
                {
                    spritebatch.Draw(
                        this.Sprite.Texture,
                        this.Position - new Vector2(i * 1, i * 1),
                        null,
                        Color.White,
                        Sprite.Rotation,
                        Sprite.Origin, Sprite.Scale,
                        SpriteEffects.None, Sprite.Depth);
                }
            }
            if (Backside.IsAction == true)
            {
                Backside.Draw(spritebatch);
            }
            //spritebatch.DrawString(m_font, Convert.ToString(ListCard.Count), Sprite.Position, Color.White);
            spritebatch.End();
            num_sprite.Draw(spritebatch);
        }
Example #2
0
 public void DrawCard()
 {
     if (this.Count == 0)
     {
         return;
     }
     this.Backside.Position = this.Position + Backside.Origin;
     this.Backside.Scale    = Vector2.One;
     if (this.PlayerID == ePlayerId.PLAYER)
     {
         this.Backside.AddMoveTo(new MoveTo(0.15f, new Vector2(
                                                this.Position.X,
                                                GlobalSetting.Default.PlayerHand.Y)));
     }
     else
     {
         this.Backside.AddMoveTo(new MoveTo(0.15f, new Vector2(
                                                this.Position.X,
                                                ComputerSetting.Default.Hand.Y)));
     }
     Backside.AddScaleTo(new ScaleTo(0.20f, new Vector2(0.15f, 1.2f)));
     this.MoveTopToDeck(eDeckId.HAND);
 }