Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/enemies.py

    r235 r229  
    99from nagslang.mutators import FLIP_H
    1010from nagslang.resources import resources
    11 
    12 
    13 def get_editable_enemies():
    14     classes = []
    15     for cls_name, cls in globals().iteritems():
    16         if isinstance(cls, type) and issubclass(cls, Enemy):
    17             if hasattr(cls, 'requires'):
    18                 classes.append((cls_name, cls))
    19     return classes
    2011
    2112
     
    4233    def attack(self):
    4334        raise NotImplementedError
    44 
    45     @classmethod
    46     def requires(cls):
    47         return [("name", "string"), ("position", "coordinates")]
    4835
    4936
     
    126113        self.set_direction(x_step, y_step)
    127114        super(PatrollingAlien, self).animate()
    128 
    129     @classmethod
    130     def requires(cls):
    131         return [("name", "string"), ("position", "coordinates"),
    132                 ("end_position", "coordinates")]
Note: See TracChangeset for help on using the changeset viewer.