mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
add support for custom views in factory
This commit is contained in:
parent
85dae20f1f
commit
853432e4ff
@ -12,6 +12,7 @@ import EntityCreator
|
||||
import OnscreenText
|
||||
import Task
|
||||
import LevelUtil
|
||||
import FactoryCameraViews
|
||||
|
||||
class DistributedLevel(DistributedObject.DistributedObject,
|
||||
Level.Level):
|
||||
@ -79,6 +80,10 @@ class DistributedLevel(DistributedObject.DistributedObject,
|
||||
# add factory menu to SpeedChat
|
||||
toonbase.localToon.chatMgr.chatInputSpeedChat.addFactoryMenu()
|
||||
|
||||
# add special camera views
|
||||
self.factoryViews = FactoryCameraViews.FactoryCameraViews(self)
|
||||
|
||||
|
||||
# the real required fields
|
||||
def setLevelZoneId(self, zoneId):
|
||||
# this is the zone that the level is in; we should listen to this
|
||||
@ -301,7 +306,9 @@ class DistributedLevel(DistributedObject.DistributedObject,
|
||||
DistributedObject.DistributedObject.delete(self)
|
||||
# remove factory menu to SpeedChat
|
||||
toonbase.localToon.chatMgr.chatInputSpeedChat.removeFactoryMenu()
|
||||
|
||||
# remove special camera views
|
||||
del self.factoryViews
|
||||
|
||||
def getZoneNode(self, zoneNum):
|
||||
return self.zoneNum2node[zoneNum]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user