Mercurial > touhou
diff pytouhou/game/itemtype.py @ 150:4f46717390aa
Introduce items, implement ECL instruction 83
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 04 Oct 2011 23:09:41 +0200 |
parents | |
children | 37df8c618c2e |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/pytouhou/game/itemtype.py @@ -0,0 +1,12 @@ +from pytouhou.game.sprite import Sprite + +class ItemType(object): + def __init__(self, anm_wrapper, sprite_index, indicator_sprite_index, speed, + hitbox_size): + self.anm_wrapper = anm_wrapper + self.sprite = Sprite() + self.sprite.anm, self.sprite.texcoords = anm_wrapper.get_sprite(sprite_index) + self.indicator_sprite = Sprite() + self.indicator_sprite.anm, self.indicator_sprite.texcoords = anm_wrapper.get_sprite(indicator_sprite_index) + self.speed = speed + self.hitbox_size = hitbox_size