Poodletooth-iLand/toontown/cogdominium/DistCogdoLevelGame.py

46 lines
1.5 KiB
Python
Raw Normal View History

2015-03-03 16:10:12 -06:00
from direct.directnotify.DirectNotifyGlobal import directNotify
from otp.level.DistributedLevel import DistributedLevel
from otp.level import LevelConstants
from otp.level.LevelSpec import LevelSpec
2015-03-03 16:10:12 -06:00
from toontown.cogdominium.DistCogdoGame import DistCogdoGame
from toontown.cogdominium.CogdoEntityCreator import CogdoEntityCreator
class DistCogdoLevelGame(DistCogdoGame, DistributedLevel):
2015-03-03 16:10:12 -06:00
notify = directNotify.newCategory('DistCogdoLevelGame')
def __init__(self, cr):
DistributedLevel.__init__(self, cr)
DistCogdoGame.__init__(self, cr)
def generate(self):
DistributedLevel.generate(self)
DistCogdoGame.generate(self)
def announceGenerate(self):
DistributedLevel.announceGenerate(self)
DistCogdoGame.announceGenerate(self)
def createEntityCreator(self):
return CogdoEntityCreator(level=self)
def levelAnnounceGenerate(self):
self.notify.debug('levelAnnounceGenerate')
DistributedLevel.levelAnnounceGenerate(self)
DistributedLevel.initializeLevel(self, LevelSpec(self.getSpec()))
2015-03-03 16:10:12 -06:00
def initVisibility(self):
levelMgr = self.getEntity(LevelConstants.LevelMgrEntId)
levelMgr.geom.reparentTo(render)
DistributedLevel.initVisibility(self)
def placeLocalToon(self):
DistributedLevel.placeLocalToon(self, moveLocalAvatar=False)
def disable(self):
DistCogdoGame.disable(self)
DistributedLevel.disable(self)
def delete(self):
DistCogdoGame.delete(self)
2015-04-27 18:51:51 -05:00
DistributedLevel.delete(self)