23 lines
472 B
Python
23 lines
472 B
Python
class Thing:
|
|
allThings = set()
|
|
|
|
def __init__(self):
|
|
self.networkId = None
|
|
self.id = None
|
|
self.type = None
|
|
|
|
self.modelUrl = None
|
|
Thing.Add(self)
|
|
|
|
def update(self, currentTime):
|
|
pass
|
|
|
|
@staticmethod
|
|
def Add(thing):
|
|
thing.id = len(Thing.allThings)
|
|
Thing.allThings.add(thing)
|
|
|
|
def UpdateAll(currentTime):
|
|
for thing in Thing.allThings:
|
|
thing.update(currentTime)
|