예제 #1
0
파일: Action.cs 프로젝트: trungfinity/steit
            internal static CardDiscard Deserialize(IReader reader, Path path = null)
            {
                var cardDiscard = new CardDiscard(path);

                cardDiscard.Replace(reader);
                return(cardDiscard);
            }
예제 #2
0
파일: Action.cs 프로젝트: trungfinity/steit
        public void ReplaceAt(UInt32 tag, WireType wireType, IReader reader, bool shouldNotify)
        {
            switch (tag)
            {
            case 0: this.UpdateAndNotify(0, Raw.Deserialize(reader, this.Path.GetNested(0)), shouldNotify); break;

            case 1: this.UpdateAndNotify(1, CardDraw.Deserialize(reader, this.Path.GetNested(1)), shouldNotify); break;

            case 2: this.UpdateAndNotify(2, CardDiscard.Deserialize(reader, this.Path.GetNested(2)), shouldNotify); break;

            case 3: this.UpdateAndNotify(3, Attack.Deserialize(reader, this.Path.GetNested(3)), shouldNotify); break;

            case 4: this.UpdateAndNotify(4, Skill.Deserialize(reader, this.Path.GetNested(4)), shouldNotify); break;

            default: reader.SkipToEnd(); break;
            }
        }