public dwObject2D(PlayerData owningPlayer) { if (owningPlayer == null) throw new System.ArgumentNullException(); indexer.indexObject(this); orderQueue = new Queue<Order>(); position = new dwVector2(0, 0); owner = owningPlayer; }
public virtual void deserialize(NetIncomingMessage inMsg) { owner = dwObject2D.deserialize(inMsg); targetType = (TargetType)inMsg.ReadByte(); switch (targetType) { case (TargetType.Instant): break; case (TargetType.Point): targetPoint = new dwVector2(); targetPoint.deserialize(inMsg); break; case (TargetType.Object): targetObject = dwObject2D.deserialize(inMsg); break; } }
public MoveOrder(dwVector2 targetLoc) { targetPoint = targetLoc; }
public dwVector2(dwVector2 source) : this(source.x, source.y) { }