Esempio n. 1
0
 public void Clear()
 {
     currentContainer = null;
     while (outputContainersQueue.Count != 0)
     {
         var container = outputContainersQueue.Dequeue();
         Destroy(container.gameObject);
     }
 }
Esempio n. 2
0
        public void BeginPrint(string name)
        {
            encapsulatingPrintCalls = true;

            var containerGO = Instantiate(commandOutputContainerPrefab, outputContent);

            containerGO.name = name;

            var container = containerGO.GetComponent <CommandOutputContainer>();

            container.timestamp.text = DateTime.Now.ToString("HH:mm:ss");

            currentContainer = container;
            outputContainersQueue.Enqueue(container);

            if (outputContainersQueue.Count > OutputSize)
            {
                var oldContainer = outputContainersQueue.Dequeue();
                Destroy(oldContainer.gameObject);
            }
        }
Esempio n. 3
0
 public void EndPrint()
 {
     encapsulatingPrintCalls = false;
     currentContainer        = null;
 }