Exemple #1
0
 public ReadOnlyCard(ICard card)
 {
     type = card.Type;
     place = card.Place;
     rank = card.Rank;
     suit = card.Suit;
     owner = card.Owner;
     suitColor = card.SuitColor;
     if (card.Attributes == null)
     {
         attributes = new Dictionary<CardAttribute, int>();
     }
     else
     {
         attributes = new Dictionary<CardAttribute, int>(card.Attributes);
     }
 }
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            SuitColorType color = (SuitColorType)value;

            if (color == SuitColorType.Black)
            {
                return(new SolidColorBrush(Colors.Black));
            }
            else if (color == SuitColorType.Red)
            {
                Color red = new Color();
                red.R = 212;
                red.A = 255;
                return(new SolidColorBrush(red));
            }
            else
            {
                return(new SolidColorBrush(Colors.Transparent));
            }
        }
Exemple #3
0
        private string GetSuitColorTypeString(SuitColorType suitColorType)
        {
            switch (suitColorType)
            {
            case SuitColorType.Primary:
                return(TitleInstanceConstants.ColorTypePrimary);

            case SuitColorType.Secondary:
                return(TitleInstanceConstants.ColorTypeSecondary);

            case SuitColorType.Visor:
                return(TitleInstanceConstants.ColorTypeVisor);

            case SuitColorType.Lights:
                return(TitleInstanceConstants.ColorTypeLights);

            case SuitColorType.Holo:
                return(TitleInstanceConstants.ColorTypeHolo);

            default:
                throw new ArgumentOutOfRangeException("suitColorType");
            }
        }
 public ShuangXiongCardTransformSkill(SuitColorType color)
 {
     this.color   = color;
     HandCardOnly = true;
 }
Exemple #5
0
 public ShuangXiongCardTransformSkill(SuitColorType color)
 {
     this.color = color;
 }
Exemple #6
0
 public QianXiCannotUsedAndPlayCard(Player player, SuitColorType colorType)
 {
     color = colorType;
     Owner = player;
 }
 public QianXiCannotUsedAndPlayCard(Player player, SuitColorType colorType)
 {
     color = colorType;
     Owner = player;
 }