- def activateCondition(self, condition):
- if (condition):
- if (self.state == self.HIDDEN):
- self.showPixmap()
- else:
- if (self.state == self.SHOWN):
- self.hidePixmap()
+ def addMovePoint(self, x, y, time = 20):
+ self.path.append((x, y, time))
+
+ def moveTo(self, x, y, time = 20):
+ self.clearPath()
+ self.addMovePoint(x, y, time)
+
+ def startMoving(self):
+ if not self.moving:
+ self.time = self.path[self.currDest][2]
+ self.stepX = (self.path[self.currDest][0] - self.x) / float(self.time)
+ self.stepY = (self.path[self.currDest][1] - self.y) / float(self.time)