annotate skaapsteker/sprites/projectiles.py @ 336:c8fd82ff0c71

Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
author Simon Cross <hodgestar@gmail.com>
date Sat, 09 Apr 2011 12:29:34 +0200
parents
children 8f578fe33fe7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
336
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
1 """Things people throw at each other."""
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
2
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
3 from .sprites import Projectile
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
4
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
5 class Fireball(Projectile):
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
6
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
7 gravitates = True
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
8
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
9 image_dir = 'sprites/fireball'
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
10 animation_regexes = [
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
11 ("raining_death", r"^fireball-\d+.png$"),
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
12 ]
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
13
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
14 def collided_player(self, player):
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
15 print "%s went boom with player" % self
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
16
c8fd82ff0c71 Hook up fire buttons to attack functions. Use correct check for tails. Add skeleton for projectiles.
Simon Cross <hodgestar@gmail.com>
parents:
diff changeset
17