summaryrefslogtreecommitdiff
path: root/src/mapdata.py
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2012-05-13 10:37:33 -0500
committerColin Noga <Tempus@chronometry.ca>2012-05-13 10:37:33 -0500
commit06c6ea9b11837d32b47dfe2807e3fc83eb80c9a4 (patch)
tree6c165950434f3c688b26aef2d53f31df1a115985 /src/mapdata.py
parente037c2d4256e2975e50d00517526794dff444f0d (diff)
downloadkoopatlas-06c6ea9b11837d32b47dfe2807e3fc83eb80c9a4.tar.gz
koopatlas-06c6ea9b11837d32b47dfe2807e3fc83eb80c9a4.zip
Added Delay offset, made Y scale begin from bottom coords rather than top, some fixes
Diffstat (limited to '')
-rw-r--r--src/mapdata.py25
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)