Mercurial > touhou
comparison pytouhou/game/itemtype.py @ 197:e1bc8c4cbb1a
Do the right action when collecting an item.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 30 Oct 2011 11:29:08 -0700 |
parents | 37df8c618c2e |
children | 5afc75f71fed |
comparison
equal
deleted
inserted
replaced
196:1e501e3b6645 | 197:e1bc8c4cbb1a |
---|---|
1 from pytouhou.game.sprite import Sprite | 1 from pytouhou.game.sprite import Sprite |
2 | 2 |
3 class ItemType(object): | 3 class ItemType(object): |
4 def __init__(self, anm_wrapper, sprite_index, indicator_sprite_index, hitbox_size, score=0): | 4 def __init__(self, anm_wrapper, sprite_index, indicator_sprite_index, hitbox_size=38.): |
5 self.anm_wrapper = anm_wrapper | 5 self.anm_wrapper = anm_wrapper |
6 self.sprite = Sprite() | 6 self.sprite = Sprite() |
7 self.sprite.anm, self.sprite.texcoords = anm_wrapper.get_sprite(sprite_index) | 7 self.sprite.anm, self.sprite.texcoords = anm_wrapper.get_sprite(sprite_index) |
8 self.indicator_sprite = Sprite() | 8 self.indicator_sprite = Sprite() |
9 self.indicator_sprite.anm, self.indicator_sprite.texcoords = anm_wrapper.get_sprite(indicator_sprite_index) | 9 self.indicator_sprite.anm, self.indicator_sprite.texcoords = anm_wrapper.get_sprite(indicator_sprite_index) |
10 self.hitbox_size = hitbox_size | 10 self.hitbox_size = hitbox_size |
11 self.score = score |