mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-21 14:41:11 -04:00
29 lines
1.0 KiB
Python
Executable File
29 lines
1.0 KiB
Python
Executable File
"""EditMgrBase module: contains the EditMgrBase class"""
|
|
|
|
import Entity
|
|
import DirectNotifyGlobal
|
|
|
|
class EditMgrBase(Entity.Entity):
|
|
"""This class contains EditMgr code shared between AI and client"""
|
|
notify = DirectNotifyGlobal.directNotify.newCategory("EditMgr")
|
|
def __init__(self, level, entId):
|
|
Entity.Entity.__init__(self, level, entId)
|
|
|
|
def destroy(self):
|
|
Entity.Entity.destroy(self)
|
|
self.ignoreAll()
|
|
|
|
if __debug__:
|
|
def setInsertEntity(self, data):
|
|
# tell the level who created this entity
|
|
self.level.setEntityCreatorUsername(data['entId'], data['username'])
|
|
# create the entity
|
|
self.level.levelSpec.insertEntity(data['entId'],
|
|
data['entType'],
|
|
data['parentEntId'],
|
|
)
|
|
|
|
def setRemoveEntity(self, data):
|
|
self.level.levelSpec.removeEntity(data['entId'],
|
|
)
|