コード例 #1
0
ファイル: SlotTrait.cs プロジェクト: argul/tri_battle
	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();
		}
	}
コード例 #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();
        }
    }
コード例 #3
0
ファイル: SlotFactoryConfig.cs プロジェクト: argul/tri_battle
	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;
	}
コード例 #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;
    }