/// <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; }
/// <summary> /// Creates a new instance of Level class. /// </summary> public Level() { this.countDown = new CountDownDefinition(); this.pipeQueue = new PipeQueueDefinition(); this.squareMap = new SquareMapDefinition(); }
/// <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(); } }