dna: Add DNAAnimProp.

This commit is contained in:
Sam Edwards 2014-04-06 05:32:31 -06:00
parent 174b61cb62
commit a12c1a9221
4 changed files with 19 additions and 5 deletions

View file

@ -0,0 +1,14 @@
from DNAProp import DNAProp
from DNAParser import *
from panda3d.core import *
class DNAAnimProp(DNAProp):
TAG = 'anim_prop'
def __init__(self, name, code, anim):
DNAProp.__init__(self, name, code)
self.anim = anim
registerElement(DNAAnimProp)

View file

@ -1,14 +1,13 @@
from DNAProp import DNAProp
from DNAAnimProp import DNAAnimProp
from DNAParser import *
from panda3d.core import *
class DNAInteractiveProp(DNAProp):
class DNAInteractiveProp(DNAAnimProp):
TAG = 'interactive_prop'
def __init__(self, name, code, anim, cell_id='0'):
DNAProp.__init__(self, name, code)
DNAAnimProp.__init__(self, name, code, anim)
self.anim = anim
self.cell_id = int(cell_id)

View file

@ -3,7 +3,7 @@ from DNAParser import *
from panda3d.core import *
class DNAPropertyElement(DNASceneElement):
PARENTS = ['prop', 'interactive_prop', 'node', 'flat_building',
PARENTS = ['prop', 'anim_prop', 'interactive_prop', 'node', 'flat_building',
'landmark_building', 'door', 'flat_door', 'wall', 'windows',
'cornice', 'sign', 'baseline', 'street']

View file

@ -16,6 +16,7 @@ import DNANode
import DNAVisGroup
import DNAProp
import DNAAnimProp
import DNAInteractiveProp
import DNAFlatBuilding
import DNALandmarkBuilding