comparison 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
comparison
equal deleted inserted replaced
149:3673d55a8448 150:4f46717390aa
1 from pytouhou.game.sprite import Sprite
2
3 class ItemType(object):
4 def __init__(self, anm_wrapper, sprite_index, indicator_sprite_index, speed,
5 hitbox_size):
6 self.anm_wrapper = anm_wrapper
7 self.sprite = Sprite()
8 self.sprite.anm, self.sprite.texcoords = anm_wrapper.get_sprite(sprite_index)
9 self.indicator_sprite = Sprite()
10 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