Exemple #1
0
	public static SlotTrait StaticDeserialize(string str)
	{
		var tuple = JsonHelper.Deserialize<Tuple<string, string>>(str);
		switch (tuple.item1)
		{
		case SLOT_TRAIT_COLOR:
			var ret = new SlotTraitColor();
			ret.Deserialize(tuple.item2);
			return ret;
		default:
			throw new NotSupportedException();
		}
	}
Exemple #2
0
    public static SlotTrait StaticDeserialize(string str)
    {
        var tuple = JsonHelper.Deserialize <Tuple <string, string> >(str);

        switch (tuple.item1)
        {
        case SLOT_TRAIT_COLOR:
            var ret = new SlotTraitColor();
            ret.Deserialize(tuple.item2);
            return(ret);

        default:
            throw new NotSupportedException();
        }
    }
	public SlotConfig_Hardcoded()
	{
		traits = new List<SlotTrait>();
		specials = new Dictionary<string, SlotSpecialty>();
		var red = new SlotTraitColor(255, 0, 0, 255);
		var green = new SlotTraitColor(0, 255, 0, 255);
		var blue = new SlotTraitColor(0, 0, 255, 255);
		var yellow = new SlotTraitColor(255, 255, 0, 255);
		var syan = new SlotTraitColor(0, 255, 255, 255);
		var purple = new SlotTraitColor(255, 0, 255, 255);
		traits.Add(red);
		traits.Add(green);
		traits.Add(blue);
		traits.Add(yellow);
		traits.Add(syan);
		traits.Add(purple);
		constantRndSeed = true;
	}
Exemple #4
0
    public SlotConfig_Hardcoded()
    {
        traits   = new List <SlotTrait>();
        specials = new Dictionary <string, SlotSpecialty>();
        var red    = new SlotTraitColor(255, 0, 0, 255);
        var green  = new SlotTraitColor(0, 255, 0, 255);
        var blue   = new SlotTraitColor(0, 0, 255, 255);
        var yellow = new SlotTraitColor(255, 255, 0, 255);
        var syan   = new SlotTraitColor(0, 255, 255, 255);
        var purple = new SlotTraitColor(255, 0, 255, 255);

        traits.Add(red);
        traits.Add(green);
        traits.Add(blue);
        traits.Add(yellow);
        traits.Add(syan);
        traits.Add(purple);
        constantRndSeed = true;
    }