Пример #1
0
 // constructor used by PlayerAction.FromXml
 public PlayUnitCardAction(XmlElement e, IdIssuer <Card> cl, IdIssuer <Lane> lanes)
 {
     this.cardTarget = new SendableTarget <Card>("card", e, cl);
     this.laneTarget = new SendableTarget <Lane>("lane", e, lanes);
     this.pos        = GetXmlInt(e, "pos");
     this.sideIndex  = GetXmlInt(e, "sideIndex");
 }
Пример #2
0
 public PlayUnitCardAction(UnitCard card, Lane lane, int sideIndex, int position)
 {
     this.cardTarget = new SendableTarget <Card>("card", card);
     this.laneTarget = new SendableTarget <Lane>("lane", lane);
     this.pos        = position;
     this.sideIndex  = sideIndex;
 }
Пример #3
0
 public TargetedDelta(XmlElement from, IdIssuer <T> issuer, CardLoader loader)
     : base(from, loader)
 {
     _target = new SendableTarget <T>("targetId", from, issuer);
 }
Пример #4
0
 // Xml constructor: for use when getting an XML representatino based  on Xml for a network message (client side)
 // every child class needs one THAT TAKES EXACTLY ONE XML ELEMENT AND A CARD LOADER
 // THESE CONSTRUCTORS ARE PUBLIC FOR REFLECTION; THEY ARE NOT MEANT TO BE CALLED EXTERNALLY
 public Delta(XmlElement from, CardLoader cardLoader)
 {
     SendableCard = new SendableTarget <Card>("card", from, cardLoader);
 }
Пример #5
0
 // an alternate non-Xml constructor
 public Delta(Card c)
 {
     SendableCard = new SendableTarget <Card>("card", c);
 }
Пример #6
0
 // non-Xml constructor: for use when originating a delta (server side)
 // every child class needs one
 public Delta()
 {
     SendableCard = new SendableTarget <Card>("card", null);
 }