예제 #1
0
        public override void Draw(SpriteBatch Target)
        {
            if (Visible)
            {
                var TmpCardNameColor       = CardName.color;
                var TmpDamageInfoColor     = DamageInfo.color;
                var TmpDefenseInfoColor    = DefenseInfo.color;
                var TmpAttDistInfoColor    = AttackDistanceInfo.color;
                var TmpMovePointsInfoColor = MovePointsInfo.color;
                var TmpHPInfoColor         = HPInfo.color;
                var TmpMoneyInfoColor      = MoneyInfo.color;
                if (!Enabled)
                {
                    CurrentFrame             = DisabledFrame;
                    CardName.color           = Color.Gray;
                    DamageInfo.color         = Color.Gray;
                    DefenseInfo.color        = Color.Gray;
                    AttackDistanceInfo.color = Color.Gray;
                    MovePointsInfo.color     = Color.Gray;
                    HPInfo.color             = Color.Gray;
                    MoneyInfo.color          = Color.Gray;
                }

                Target.Draw(Texture, Position, null, new Rectangle(Convert.ToInt32(CurrentFrame * FrameSize.X), 0, Convert.ToInt32(FrameSize.X), Convert.ToInt32(FrameSize.Y)), RotationPoint, 0, Scale, Color.White, SpriteEffects.None, Layer);
                if (Art != null)
                {
                    Art.Draw(Target);
                }
                if (CardName != null)
                {
                    CardName.Draw(Target);
                }
                if (DamageInfo != null)
                {
                    DamageInfo.Draw(Target);
                }
                if (DefenseInfo != null)
                {
                    DefenseInfo.Draw(Target);
                }
                if (AttackDistanceInfo != null)
                {
                    AttackDistanceInfo.Draw(Target);
                }
                if (MovePointsInfo != null)
                {
                    MovePointsInfo.Draw(Target);
                }
                if (HPInfo != null)
                {
                    HPInfo.Draw(Target);
                }
                if (MoneyInfo != null)
                {
                    MoneyInfo.Draw(Target);
                }

                if (!Enabled)
                {
                    CardName.color           = TmpCardNameColor;
                    DamageInfo.color         = TmpDamageInfoColor;
                    DefenseInfo.color        = TmpDefenseInfoColor;
                    AttackDistanceInfo.color = TmpAttDistInfoColor;
                    MovePointsInfo.color     = TmpMovePointsInfoColor;
                    HPInfo.color             = TmpHPInfoColor;
                    MoneyInfo.color          = TmpMoneyInfoColor;
                }
            }
        }