示例#1
0
 public Flower()
 {
     Type        = FlowerType.Mixed;
     Color       = FlowerColor.Mixed;
     Arrangement = FlowerArrangement.Vase;
     pc          = 0.00M;
 }
示例#2
0
    public static string Translate(this FlowerColor color)
    {
        if (GameManager.Instance.language == Language.ko_KR)
        {
            switch (color)
            {
            case FlowerColor.white:
                return("하양");

            case FlowerColor.red:
                return("빨강");

            case FlowerColor.yellow:
                return("노랑");

            case FlowerColor.purple:
                return("보라");

            case FlowerColor.pink:
                return("분홍");

            case FlowerColor.black:
                return("검정");

            case FlowerColor.orange:
                return("주황");
            }
        }
        return("Invalid");
    }
示例#3
0
 public Flower(FlowerType type, FlowerColor color,
               FlowerArrangement argn, decimal price)
 {
     Type        = type;
     Color       = color;
     Arrangement = argn;
     pc          = price;
 }
示例#4
0
 public Flower(FlowerKind kind, FlowerColor color, string id) : base(id)
 {
     this.kind  = kind;
     this.color = color;
     Name       = string.Format("{0}({1})", kind.Translate(), color.Translate());
 }
示例#5
0
 public void Set(FlowerColor ingridient1, FlowerColor ingridient2)
 {
     Color  = PotionColorExtension.MixColor(ingridient1, ingridient2);
     action = effectMap[color];
 }
示例#6
0
 public Flower(string _name, FlowerColor _color, float _price)
 {
     this._name  = _name;
     this._color = _color;
     this._price = _price;
 }
示例#7
0
    public static PotionColor MixColor(FlowerColor c1, FlowerColor c2)
    {
        if (c1 > c2)
        {
            (c1, c2) = (c2, c1);
        }

        if (c1.IsBasic() && c2.IsBasic())
        {
            if (c1 == c2)
            {
                return(c1.GetPotionColor());
            }
            else if (c1 == FlowerColor.red)
            {
                if (c2 == FlowerColor.yellow)
                {
                    return(PotionColor.orange);
                }
                if (c2 == FlowerColor.blue)
                {
                    return(PotionColor.purple);
                }
                if (c2 == FlowerColor.black)
                {
                    return(PotionColor.maroon);
                }
                if (c2 == FlowerColor.white)
                {
                    return(PotionColor.pink);
                }
            }
            else if (c1 == FlowerColor.yellow)
            {
                if (c2 == FlowerColor.blue)
                {
                    return(PotionColor.green);
                }
                if (c2 == FlowerColor.black)
                {
                    return(PotionColor.brown);
                }
                if (c2 == FlowerColor.white)
                {
                    return(PotionColor.cream);
                }
            }
            else if (c1 == FlowerColor.blue)
            {
                if (c2 == FlowerColor.black)
                {
                    return(PotionColor.navy);
                }
                if (c2 == FlowerColor.white)
                {
                    return(PotionColor.aqua);
                }
            }
            else if (c1 == FlowerColor.black)
            {
                if (c2 == FlowerColor.white)
                {
                    return(PotionColor.gray);
                }
            }
        }
        else
        {
            if (Random.Range(0, 2) > 0.5f)
            {
                return(c1.GetPotionColor());
            }
            else
            {
                return(c2.GetPotionColor());
            }
        }

        return(PotionColor.white);
    }