示例#1
0
        /// <summary>
        /// Creates pipe queue.
        /// </summary>
        /// <param name="definition">The pipe queue definition used to create pipe queue.</param>
        /// <returns>Newly created pipe queue if possible, otherwise null.</returns>
        public IPipeQueueElement CreatePipeQueue(PipeQueueDefinition definition)
        {
            IPipeQueueElement element = this.CreatePipeQueue();

            if (element != null)
            {
                element.FromDefinition(definition);
            }

            return element;
        }
示例#2
0
 /// <summary>
 /// Creates a new instance of Level class.
 /// </summary>
 public Level()
 {
     this.countDown = new CountDownDefinition();
     this.pipeQueue = new PipeQueueDefinition();
     this.squareMap = new SquareMapDefinition();
 }
示例#3
0
 /// <summary>
 /// Applies definition to pipe queue.
 /// </summary>
 /// <param name="definition">The pipe queue definition to apply from.</param>
 public void FromDefinition(PipeQueueDefinition definition)
 {
     if (definition != null)
     {
         this.Clear();
         this.capacity = definition.Capacity;
         this.fillMode = (PipeQueueFillMode)definition.FillMode;
         this.Adjust();
     }
 }