예제 #1
0
        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;
        }
예제 #2
0
        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;
            }
        }
예제 #3
0
 public MoveOrder(dwVector2 targetLoc)
 {
     targetPoint = targetLoc;
 }
예제 #4
0
 public dwVector2(dwVector2 source)
     : this(source.x, source.y)
 {
 }