//取出WorldManager中的第一个进行速度控制 static void SpeedControl() { if (s_worldList.Count > 0) { WorldBase world = s_worldList[0]; int chacheCount = world.GetCacheCount(); if (chacheCount <= 2) { UpdateSpped = 1f; } else if (chacheCount < 4) { UpdateSpped = 2f; } else if (chacheCount < 8) { UpdateSpped = 4f; } else { UpdateSpped = 8f; //立即追赶到目标帧 for (int i = 0; i < chacheCount; i++) { world.OptimisticFixedLoop(IntervalTime); } } } }