Changeset 310:fa408430a174 for nagslang


Ignore:
Timestamp:
09/05/13 22:41:49 (8 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
Phase:
public
Rebase:
65356337356335326138336464366432316561336533636666366439383731396132356634363932
Message:

Now *both* types of enemies die

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/enemies.py

    r308 r310  
    5252        return [("name", "string"), ("position", "coordinates")]
    5353
     54    def hit(self, weapon):
     55        self.lose_health(weapon.damage)
     56
    5457    def lose_health(self, amount):
    5558        self.health -= amount
     
    5760            self.physicser.remove_from_space()
    5861            self.remove = True
    59             EnemyDeathEvent.post(self.physicser.position, 'A')
     62            EnemyDeathEvent.post(self.physicser.position, self.enemy_type)
    6063
    6164
     
    160163    def collide_with_protagonist(self, protagonist):
    161164        protagonist.lose_health(15)
    162 
    163     def hit(self, weapon):
    164         self.lose_health(weapon.damage)
    165165
    166166    @classmethod
Note: See TracChangeset for help on using the changeset viewer.