/** 输出 */ public void onPrint(string str) { _printQueue.offer(str.Length + 1); _printSb.Append(str); _printSb.Append('\n'); while (_printSb.Length > _printMaxCacheLength) { _printSb.Remove(0, _printQueue.poll()); } if (!_isShow) { return; } refreshPrintShow(); }
private void doFrame(int delay) { if (_waiting) { return; } if (_cacheQueue.isEmpty()) { _waiting = true; } else { FrameSyncData data = _cacheQueue.poll(); if (data.commands != null && !data.commands.isEmpty()) { data.commands.forEach(preExecuteCommand); } _scene.doFrame(delay); } }