Ignore:
Timestamp:
09/05/13 22:32:38 (9 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Phase:
public
Rebase:
33353963346133346637373761343861303730623836356536396634356233663861326238343337
Message:

Rename animate to update and pass seconds, for future fun

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/enemies.py

    r305 r307  
    111111            (dx * self.impulse_factor, dy * self.impulse_factor))
    112112
    113     def animate(self):
     113    def update(self, seconds):
    114114        # Calculate the step every frame
    115115        if self._direction == 'away':
     
    134134            self._switch_direction()
    135135        self.set_direction(x_step, y_step)
    136         super(PatrollingAlien, self).animate()
     136        super(PatrollingAlien, self).update(seconds)
    137137
    138138    def collide_with_protagonist(self, protagonist):
     
    194194            (dx * self.impulse_factor, dy * self.impulse_factor))
    195195
    196     def animate(self):
     196    def update(self, seconds):
    197197        # Calculate the step every frame
    198198        # Distance to the protagonist
     
    219219            y_step = 0
    220220        self.set_direction(x_step, y_step)
    221         super(ChargingAlien, self).animate()
     221        super(ChargingAlien, self).update(seconds)
    222222
    223223    def collide_with_protagonist(self, protagonist):
Note: See TracChangeset for help on using the changeset viewer.