- self.blink = True
- self.loadNext(event)
-
- def update(self) :
- print 'cursor update'
-
-# 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
-
- elapsedTime:
- The time passed since the previous update
- '''
- self._animationOffset += elapsedTime
-
- if self._animationOffset > self.duration :
- #New animation offset is computed first, before updating the pointer
- self._animationOffset -= self.duration
- #point to the next image (restarts from the beginning when it reaches the end)
- self._imagePointer = (self._imagePointer + 1) % len(self.images)
-
- if self.flashing:
- self.image = pygame.image.load(self.flashImagePath).convert_alpha()