mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
consolidated Nodepath entities
This commit is contained in:
parent
d9741e886d
commit
ba426a409a
@ -52,28 +52,15 @@ class LogicGate(Entity):
|
|||||||
{'choiceSet':['or','and','xor','nand','nor','xnor']}),
|
{'choiceSet':['or','and','xor','nand','nor','xnor']}),
|
||||||
)
|
)
|
||||||
|
|
||||||
class NodepathImpl:
|
class Nodepath(Entity):
|
||||||
isNodePath = 1
|
|
||||||
attribs = (
|
|
||||||
('parent', 0, 'entId', {'type':'isNodePath'}),
|
|
||||||
('pos', Point3(0,0,0), 'pos'),
|
|
||||||
('hpr', Vec3(0,0,0), 'hpr'),
|
|
||||||
)
|
|
||||||
|
|
||||||
# Note: this covers Nodepath and DistributedNodepath
|
|
||||||
class Nodepath(Entity, NodepathImpl):
|
|
||||||
type = 'nodepath'
|
type = 'nodepath'
|
||||||
isNodePath = 1
|
|
||||||
|
|
||||||
class NodepathAttribs:
|
|
||||||
isNodePath = 1
|
|
||||||
attribs = (
|
attribs = (
|
||||||
('parent', 0, 'entId', {'type':'isNodePath'}),
|
('parent', 0, 'entId', {'type':'nodepath'}),
|
||||||
('pos', Point3(0,0,0), 'pos'),
|
('pos', Point3(0,0,0), 'pos'),
|
||||||
('hpr', Vec3(0,0,0), 'hpr'),
|
('hpr', Vec3(0,0,0), 'hpr'),
|
||||||
)
|
)
|
||||||
|
|
||||||
class Zone(Entity, NodepathAttribs):
|
class Zone(Entity, Nodepath):
|
||||||
type = 'zone'
|
type = 'zone'
|
||||||
delAttribs = (
|
delAttribs = (
|
||||||
'parent',
|
'parent',
|
||||||
@ -116,7 +103,7 @@ class GagBarrel(BarrelBase):
|
|||||||
('gagTrack', 0, 'choice', {'choiceSet':range(7)}),
|
('gagTrack', 0, 'choice', {'choiceSet':range(7)}),
|
||||||
)
|
)
|
||||||
|
|
||||||
class Switch(Entity, NodepathImpl):
|
class Switch(Entity, Nodepath):
|
||||||
output = 'bool'
|
output = 'bool'
|
||||||
attribs = (
|
attribs = (
|
||||||
('scale', Vec3(1), 'scale'),
|
('scale', Vec3(1), 'scale'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user