2019-11-02 17:27:54 -05:00
|
|
|
from direct.distributed import DistributedObjectAI
|
|
|
|
from direct.directnotify import DirectNotifyGlobal
|
|
|
|
from toontown.toonbase import ToontownGlobals
|
2022-12-16 18:40:57 -06:00
|
|
|
from panda3d.core import *
|
2019-11-02 17:27:54 -05:00
|
|
|
from direct.distributed.ClockDelta import *
|
|
|
|
import time
|
|
|
|
|
|
|
|
class DistributedTimerAI(DistributedObjectAI.DistributedObjectAI):
|
|
|
|
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTimerAI')
|
|
|
|
|
|
|
|
def __init__(self, air):
|
|
|
|
DistributedObjectAI.DistributedObjectAI.__init__(self, air)
|
|
|
|
self.setStartTime(globalClockDelta.getRealNetworkTime(bits=32))
|
|
|
|
|
|
|
|
def generate(self):
|
|
|
|
DistributedObjectAI.DistributedObjectAI.generate(self)
|
|
|
|
|
|
|
|
def setStartTime(self, time):
|
|
|
|
self.startTime = time
|
|
|
|
|
|
|
|
def getStartTime(self):
|
|
|
|
return self.startTime
|