Ejemplo n.º 1
0
        private void QueueUpPieces(List <BasePiece> basePieces)
        {
            using (packetSender.Suppress <ConstructionAmountChanged>())
                using (packetSender.Suppress <ConstructionCompleted>())
                    using (packetSender.Suppress <PlaceBasePiece>())
                    {
                        foreach (BasePiece basePiece in basePieces)
                        {
                            buildEventQueue.EnqueueBasePiecePlaced(basePiece);

                            if (basePiece.ConstructionCompleted)
                            {
                                buildEventQueue.EnqueueConstructionCompleted(basePiece.Id, basePiece.BaseId);
                            }
                            else
                            {
                                buildEventQueue.EnqueueAmountChanged(basePiece.Id, basePiece.ConstructionAmount);
                            }
                        }
                    }
        }
Ejemplo n.º 2
0
 public override void Process(PlaceBasePiece packet)
 {
     buildEventQueue.EnqueueBasePiecePlaced(packet.BasePiece);
 }