mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
getAllOfType
This commit is contained in:
parent
cb2fd7957a
commit
d5feca8fe3
@ -644,3 +644,12 @@ class ClientRepository(DirectObject.DirectObject):
|
||||
self.notify.info('*** RESTORING SIMULATED PULLED-NETWORK-PLUG ***')
|
||||
self.tcpConn = self.hijackedTcpConn
|
||||
del self.hijackedTcpConn
|
||||
|
||||
def getAllOfType(self, type):
|
||||
# Returns a list of all DistributedObjects in the repository
|
||||
# of a particular type.
|
||||
result = []
|
||||
for obj in self.doId2do.values():
|
||||
if isinstance(obj, type):
|
||||
result.append(obj)
|
||||
return result
|
||||
|
Loading…
x
Reference in New Issue
Block a user