浏览代码

added getEntityTypes

Darren Ranalli 22 年之前
父节点
当前提交
c617e83e9b
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      direct/src/level/EntityCreatorBase.py

+ 5 - 0
direct/src/level/EntityCreatorBase.py

@@ -22,6 +22,11 @@ class EntityCreatorBase:
         # inheritor must define doCreateEntity
         return self.doCreateEntity(self.entType2Ctor[entType], entId)
 
+    def getEntityTypes(self):
+        """by definition, this object knows the full list of entity types
+        that may exist within the level"""
+        return self.entType2Ctor.keys()
+
     def privRegisterType(self, entType, ctor):
         if self.entType2Ctor.has_key(entType):
             self.notify.warning('replacing %s ctor %s with %s' %