mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
*** empty log message ***
This commit is contained in:
parent
01a362e816
commit
a02594e577
@ -23,7 +23,7 @@ class ForceAcknowledge(StateData.StateData):
|
||||
|
||||
if self.text:
|
||||
self.text.setText(message)
|
||||
self.text.reparentTo(render2d)
|
||||
self.text.reparentTo(aspect2d)
|
||||
|
||||
if self.okButton:
|
||||
self.okButton.manage()
|
||||
|
@ -7,13 +7,20 @@ class Timer:
|
||||
""" __init__()
|
||||
"""
|
||||
self.clock = ClockObject.ClockObject.getGlobalClock()
|
||||
self.finalT = 0.0
|
||||
self.currT = 0.0
|
||||
self.name = 'default-timer'
|
||||
self.started = 0
|
||||
|
||||
def start(self, t, name):
|
||||
""" start(t, name)
|
||||
"""
|
||||
if (self.started):
|
||||
self.stop()
|
||||
self.finalT = t
|
||||
self.name = name
|
||||
self.startT = self.clock.getFrameTime()
|
||||
self.currT = 0.0
|
||||
taskMgr.spawnMethodNamed(self.__timerTask, self.name + '-run')
|
||||
self.started = 1
|
||||
|
||||
@ -26,13 +33,18 @@ class Timer:
|
||||
self.started = 0
|
||||
return self.currT
|
||||
|
||||
def restart(self):
|
||||
""" restart()
|
||||
def resume(self):
|
||||
""" resume()
|
||||
"""
|
||||
assert(self.currT <= self.finalT)
|
||||
assert(self.started == 0)
|
||||
self.start(self.finalT - self.currT, self.name)
|
||||
|
||||
def restart(self):
|
||||
""" restart()
|
||||
"""
|
||||
self.start(self.finalT, self.name)
|
||||
|
||||
def isStarted(self):
|
||||
""" isStarted()
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user