Mercurial > touhou
annotate 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 |
rev | line source |
---|---|
150
4f46717390aa
Introduce items, implement ECL instruction 83
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
1 from pytouhou.game.sprite import Sprite |
4f46717390aa
Introduce items, implement ECL instruction 83
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
2 |
4f46717390aa
Introduce items, implement ECL instruction 83
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
3 class ItemType(object): |
4f46717390aa
Introduce items, implement ECL instruction 83
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
4 def __init__(self, anm_wrapper, sprite_index, indicator_sprite_index, speed, |
4f46717390aa
Introduce items, implement ECL instruction 83
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
5 hitbox_size): |
4f46717390aa
Introduce items, implement ECL instruction 83
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
6 self.anm_wrapper = anm_wrapper |
4f46717390aa
Introduce items, implement ECL instruction 83
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
7 self.sprite = Sprite() |
4f46717390aa
Introduce items, implement ECL instruction 83
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
8 self.sprite.anm, self.sprite.texcoords = anm_wrapper.get_sprite(sprite_index) |
4f46717390aa
Introduce items, implement ECL instruction 83
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
9 self.indicator_sprite = Sprite() |
4f46717390aa
Introduce items, implement ECL instruction 83
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
10 self.indicator_sprite.anm, self.indicator_sprite.texcoords = anm_wrapper.get_sprite(indicator_sprite_index) |
4f46717390aa
Introduce items, implement ECL instruction 83
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
11 self.speed = speed |
4f46717390aa
Introduce items, implement ECL instruction 83
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
12 self.hitbox_size = hitbox_size |