-
- #self.flashImagePath = flashImage
- #self.durations = durations
- #self.centerPosition = initCenterPosition
- #self.flashLength = 100
- #self.flashing = False
- #self.image = pygame.image.load(self.images[0]).convert_alpha()
- #self._imagePointer = 0
- #self._animationOffset = 0
- #self._flashTimer = 0
-
- def update(self, elapsedTime, centerPosition):
- '''
- Update the cursor's look and position
-
- elapsedTime:
- The time passed since the previous update
- centerPosition:
- the new position of the creep
- '''
- self._updateImage(elapsedTime)
- self.centerPosition = centerPosition
- if self.flashing :
- self._flashTimer += elapsedTime
- if self._flashTimer > self.flashLength:
- self.flashing = False
-
- def _updateImage(self, elapsedTime):
- '''
- Update the cursor's image