瀏覽代碼

added model mockup entity

Samir Naik 22 年之前
父節點
當前提交
8326fd6198
共有 3 個文件被更改,包括 10 次插入0 次删除
  1. 2 0
      direct/src/level/EntityCreator.py
  2. 1 0
      direct/src/level/EntityCreatorAI.py
  3. 7 0
      direct/src/level/EntityTypes.py

+ 2 - 0
direct/src/level/EntityCreator.py

@@ -7,6 +7,7 @@ import DirectNotifyGlobal
 import EditMgr
 import EditMgr
 import LevelMgr
 import LevelMgr
 import ZoneEntity
 import ZoneEntity
+import ModelEntity
 
 
 # some useful constructor functions
 # some useful constructor functions
 # ctor functions must take (level, entId)
 # ctor functions must take (level, entId)
@@ -28,6 +29,7 @@ class EntityCreator(EntityCreatorBase.EntityCreatorBase):
             'editMgr': EditMgr.EditMgr,
             'editMgr': EditMgr.EditMgr,
             'levelMgr': LevelMgr.LevelMgr,
             'levelMgr': LevelMgr.LevelMgr,
             'logicGate': nothing,
             'logicGate': nothing,
+            'modelMockup' : ModelEntity.ModelEntity,
             'nodepath': BasicEntities.NodePathEntity,
             'nodepath': BasicEntities.NodePathEntity,
             'zone': ZoneEntity.ZoneEntity,
             'zone': ZoneEntity.ZoneEntity,
             })
             })

+ 1 - 0
direct/src/level/EntityCreatorAI.py

@@ -48,6 +48,7 @@ class EntityCreatorAI(EntityCreatorBase.EntityCreatorBase):
             'logicGate': Functor(cLE, LogicGateAI.LogicGateAI),
             'logicGate': Functor(cLE, LogicGateAI.LogicGateAI),
             'nodepath': nothing,
             'nodepath': nothing,
             'zone': Functor(cLE, ZoneEntityAI.ZoneEntityAI),
             'zone': Functor(cLE, ZoneEntityAI.ZoneEntityAI),
+            'modelMockup' : nothing,
             })
             })
 
 
     def doCreateEntity(self, ctor, entId):
     def doCreateEntity(self, ctor, entId):

+ 7 - 0
direct/src/level/EntityTypes.py

@@ -188,6 +188,13 @@ class Lift(Nodepath):
         ('modelScale', Vec3(1), 'scale'),
         ('modelScale', Vec3(1), 'scale'),
         )
         )
 
 
+class ModelMockup(Nodepath):
+    type = 'modelMockup'
+    attribs = (
+        ('modelPath', None, 'bamfilename'),
+        ('scale', 1, 'float'),
+        )
+    
 class Platform(Nodepath):
 class Platform(Nodepath):
     type = 'platform'
     type = 'platform'
     delAttribs = (
     delAttribs = (