浏览代码

taskMgr not a global on AI

David Rose 17 年之前
父节点
当前提交
c0e0d63de4
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      direct/src/showbase/EventManager.py

+ 2 - 0
direct/src/showbase/EventManager.py

@@ -212,4 +212,6 @@ class EventManager:
         taskMgr.add(self.eventLoopTask, 'eventManager')
         taskMgr.add(self.eventLoopTask, 'eventManager')
 
 
     def shutdown(self):
     def shutdown(self):
+        # Should be safe to import the global taskMgr by now.
+        from direct.task.TaskManagerGlobal import taskMgr
         taskMgr.remove('eventManager')
         taskMgr.remove('eventManager')