Beispiel #1
0
 def __init__(self, tile, xoffset=0.0, yoffset=0.0, level=0):
     QGraphicsObject.__init__(self)
     if not isinstance(tile, Tile):
         tile = Tile(tile)
     self._tile = tile
     self._boundingRect = None
     self._cross = False
     self.setCacheMode(QGraphicsItem.DeviceCoordinateCache)
     # while moving the tile we use ItemCoordinateCache, see
     # Tile.setActiveAnimation
     self.__board = None
     self.setClippingFlags()
     self.__xoffset = xoffset
     self.__yoffset = yoffset
     self.__dark = False
     self.level = level
     self.activeAnimation = dict()  # key is the property name
     self.queuedAnimations = []