Переглянути джерело

added model mockup entity

Samir Naik 22 роки тому
батько
коміт
8326fd6198

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

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

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

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

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

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