diff options
Diffstat (limited to '')
-rw-r--r-- | src/mapdata.py | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/mapdata.py b/src/mapdata.py index 44656b7..4185a19 100644 --- a/src/mapdata.py +++ b/src/mapdata.py @@ -301,9 +301,13 @@ class KPDoodad(object): QtCore.QTimeLine.__init__(self) self.delayTimer = QtCore.QTimer() - self.delayTimer.timeout.connect(self.start) + self.delayTimer.timeout.connect(self.startTimeline) self.delayTimer.setSingleShot(True) + self.offsetTimer = QtCore.QTimer() + self.offsetTimer.timeout.connect(self.startTimeline) + self.offsetTimer.setSingleShot(True) + self.reversible = False self.reversed = False @@ -313,7 +317,7 @@ class KPDoodad(object): if not self.reversed: self.reversed = True self.toggleDirection() - self.start() + self.startTimeline() return else: self.toggleDirection() @@ -321,6 +325,14 @@ class KPDoodad(object): self.delayTimer.start() + def start(self): + + self.offsetTimer.start() + + def startTimeline(self): + + QtCore.QTimeLine.start(self) + def cleanUpAnimations(self): myTimelines = self.timelines if myTimelines is None: return @@ -342,7 +354,13 @@ class KPDoodad(object): myTimelines = [] for anim in self.animations: - Loop, Curve, Frames, Type, StartVal, EndVal, Delay = anim + if len(anim) == 6: + anim.extend([0,0]) + + if len(anim) == 7: + anim.extend([0]) + + Loop, Curve, Frames, Type, StartVal, EndVal, Delay, DelayOffset = anim Timeline = self.doodadTimeLine() @@ -369,6 +387,7 @@ class KPDoodad(object): # Setup the Delay Timer and Duration # Wii goes at 60 frames per second Timeline.delayTimer.setInterval(Delay/60.0*1000) + Timeline.offsetTimer.setInterval(DelayOffset/60.0*1000) Timeline.setDuration(Frames/60.0*1000) timelineList.append(Timeline) |