Mercurial > touhou
comparison pytouhou/game/itemtype.py @ 153:37df8c618c2e
Add falling items.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 09 Oct 2011 16:54:49 -0700 |
parents | 4f46717390aa |
children | e1bc8c4cbb1a |
comparison
equal
deleted
inserted
replaced
152:86807b8a63bd | 153:37df8c618c2e |
---|---|
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, speed, | 4 def __init__(self, anm_wrapper, sprite_index, indicator_sprite_index, hitbox_size, score=0): |
5 hitbox_size): | |
6 self.anm_wrapper = anm_wrapper | 5 self.anm_wrapper = anm_wrapper |
7 self.sprite = Sprite() | 6 self.sprite = Sprite() |
8 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) |
9 self.indicator_sprite = Sprite() | 8 self.indicator_sprite = Sprite() |
10 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) |
11 self.speed = speed | |
12 self.hitbox_size = hitbox_size | 10 self.hitbox_size = hitbox_size |
11 self.score = score |