Esempio n. 1
0
 public LogQueueManager(int maxSize, VerticalLayoutGroup container, MenuController controller,
                        LogContainer logPrefab)
 {
     this.Size      = maxSize;
     this._buffer   = new LogContainer[this.Size];
     _logsContainer = container;
     _controller    = controller;
     _logPrefab     = logPrefab;
     Debug.Log("Initialized with a max size of " + maxSize);
 }
Esempio n. 2
0
        private LogContainer GetNextContainer()
        {
            Advance();
            LogContainer nextContainer = _buffer[_pointer];

            if (nextContainer == null)
            {
                nextContainer     = CreateContainer();
                _buffer[_pointer] = nextContainer;
            }

            PutContainerAsFirst(nextContainer);
            return(nextContainer);
        }
Esempio n. 3
0
 private static void PutContainerAsFirst(LogContainer container)
 {
     container.transform.SetAsFirstSibling();
     container.transform.localScale = Vector3.one;
 }
Esempio n. 4
0
        public void AddLog(LogData data)
        {
            LogContainer container = GetNextContainer();

            container.UpdateData(data);
        }