Browse Source

cut scenes

Dave Schuyler 22 years ago
parent
commit
fb49afdfc4

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

@@ -1,5 +1,6 @@
 """EntityCreator module: contains the EntityCreator class"""
 
+import CutScene
 import EntityCreatorBase
 import BasicEntities
 import DirectNotifyGlobal
@@ -14,13 +15,16 @@ def nothing(*args):
     return None
 
 class EntityCreator(EntityCreatorBase.EntityCreatorBase):
-    """This class is responsible for creating instances of Entities on the
-    client. It can be subclassed to handle more Entity types."""
+    """
+    This class is responsible for creating instances of Entities on the
+    client. It can be subclassed to handle more Entity types.
+    """
     
     def __init__(self, level):
         EntityCreatorBase.EntityCreatorBase.__init__(self, level)
         self.level = level
         self.privRegisterTypes({
+            'cutScene': CutScene.CutScene,
             'editMgr': EditMgr.EditMgr,
             'levelMgr': LevelMgr.LevelMgr,
             'logicGate': nothing,

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

@@ -42,6 +42,7 @@ class EntityCreatorAI(EntityCreatorBase.EntityCreatorBase):
         cLE = createLocalEntity
 
         self.privRegisterTypes({
+            'cutScene': nothing,
             'editMgr': Functor(cLE, EditMgr.EditMgr),
             'levelMgr': Functor(cLE, LevelMgrAI.LevelMgrAI),
             'logicGate': Functor(cLE, LogicGateAI.LogicGateAI),

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

@@ -80,6 +80,18 @@ class Zone(Entity, NodepathAttribs):
         ('visibility', []),
         )
 
+class CutScene(Entity):
+    type = 'cutScene'
+    output = 'bool'
+    attribs = (
+        ('pos', Point3(0,0,0), 'pos'),
+        ('hpr', Vec3(0,0,0), 'hpr'),
+        ('startStop', 0),
+        ('effect', 'irisInOut'),
+        ('motion', 'foo1'),
+        ('duration', 5.0),
+        )
+
 class BarrelBase(Nodepath):
     delAttribs = (
         'hpr',