mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -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 OnscreenText
|
||||||
import Task
|
import Task
|
||||||
import LevelUtil
|
import LevelUtil
|
||||||
|
import FactoryCameraViews
|
||||||
|
|
||||||
class DistributedLevel(DistributedObject.DistributedObject,
|
class DistributedLevel(DistributedObject.DistributedObject,
|
||||||
Level.Level):
|
Level.Level):
|
||||||
@ -79,6 +80,10 @@ class DistributedLevel(DistributedObject.DistributedObject,
|
|||||||
# add factory menu to SpeedChat
|
# add factory menu to SpeedChat
|
||||||
toonbase.localToon.chatMgr.chatInputSpeedChat.addFactoryMenu()
|
toonbase.localToon.chatMgr.chatInputSpeedChat.addFactoryMenu()
|
||||||
|
|
||||||
|
# add special camera views
|
||||||
|
self.factoryViews = FactoryCameraViews.FactoryCameraViews(self)
|
||||||
|
|
||||||
|
|
||||||
# the real required fields
|
# the real required fields
|
||||||
def setLevelZoneId(self, zoneId):
|
def setLevelZoneId(self, zoneId):
|
||||||
# this is the zone that the level is in; we should listen to this
|
# this is the zone that the level is in; we should listen to this
|
||||||
@ -301,6 +306,8 @@ class DistributedLevel(DistributedObject.DistributedObject,
|
|||||||
DistributedObject.DistributedObject.delete(self)
|
DistributedObject.DistributedObject.delete(self)
|
||||||
# remove factory menu to SpeedChat
|
# remove factory menu to SpeedChat
|
||||||
toonbase.localToon.chatMgr.chatInputSpeedChat.removeFactoryMenu()
|
toonbase.localToon.chatMgr.chatInputSpeedChat.removeFactoryMenu()
|
||||||
|
# remove special camera views
|
||||||
|
del self.factoryViews
|
||||||
|
|
||||||
def getZoneNode(self, zoneNum):
|
def getZoneNode(self, zoneNum):
|
||||||
return self.zoneNum2node[zoneNum]
|
return self.zoneNum2node[zoneNum]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user