コード例 #1
0
ファイル: animation.py プロジェクト: KDE/kajongg
 def updateCurrentTime(self, value):
     """count how many steps an animation does."""
     self.steps += 1
     if self.steps % 50 == 0:
         # periodically check if the board still exists.
         # if not (game end), we do not want to go on
         for animation in self.animations:
             uiTile = animation.targetObject()
             if not isAlive(uiTile.board):
                 uiTile.clearActiveAnimation(animation)
                 self.removeAnimation(animation)
     QParallelAnimationGroup.updateCurrentTime(self, value)
コード例 #2
0
 def updateCurrentTime(self, value):
     """count how many steps an animation does."""
     self.steps += 1
     if self.steps % 50 == 0:
         # periodically check if the board still exists.
         # if not (game end), we do not want to go on
         for animation in self.animations:
             graphicsObject = animation.targetObject()
             if hasattr(graphicsObject, 'board') and not isAlive(graphicsObject.board):
                 graphicsObject.clearActiveAnimation(animation)
                 self.removeAnimation(animation)
     QParallelAnimationGroup.updateCurrentTime(self, value)