Mercurial > touhou
comparison pytouhou/game/bullet.pyx @ 430:c9433188ffdb
Remove AnmWrapper, since ANMs are lists of entries now.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 03 Aug 2013 15:49:04 +0200 |
parents | efae61ad6efe |
children | 1222341ea22c |
comparison
equal
deleted
inserted
replaced
429:40d5f3083ebc | 430:c9433188ffdb |
---|---|
77 else: | 77 else: |
78 index = bullet_type.launch_anim8_index | 78 index = bullet_type.launch_anim8_index |
79 launch_mult = bullet_type.launch_anim_penalties[2] | 79 launch_mult = bullet_type.launch_anim_penalties[2] |
80 self.dx, self.dy = self.dx * launch_mult, self.dy * launch_mult | 80 self.dx, self.dy = self.dx * launch_mult, self.dy * launch_mult |
81 self.sprite = Sprite() | 81 self.sprite = Sprite() |
82 self.anmrunner = ANMRunner(bullet_type.anm_wrapper, | 82 self.anmrunner = ANMRunner(bullet_type.anm, |
83 index, self.sprite, | 83 index, self.sprite, |
84 bullet_type.launch_anim_offsets[sprite_idx_offset]) | 84 bullet_type.launch_anim_offsets[sprite_idx_offset]) |
85 self.anmrunner.run_frame() | 85 self.anmrunner.run_frame() |
86 else: | 86 else: |
87 self.launch() | 87 self.launch() |
115 self.sprite = Sprite() | 115 self.sprite = Sprite() |
116 if self.player_bullet: | 116 if self.player_bullet: |
117 self.sprite.angle = self.angle - pi | 117 self.sprite.angle = self.angle - pi |
118 else: | 118 else: |
119 self.sprite.angle = self.angle | 119 self.sprite.angle = self.angle |
120 self.anmrunner = ANMRunner(bt.anm_wrapper, bt.anim_index, | 120 self.anmrunner = ANMRunner(bt.anm, bt.anim_index, |
121 self.sprite, self.sprite_idx_offset) | 121 self.sprite, self.sprite_idx_offset) |
122 self.anmrunner.run_frame() | 122 self.anmrunner.run_frame() |
123 | 123 |
124 | 124 |
125 def launch(self): | 125 def launch(self): |
144 self.sprite = Sprite() | 144 self.sprite = Sprite() |
145 if self.player_bullet: | 145 if self.player_bullet: |
146 self.sprite.angle = self.angle - pi | 146 self.sprite.angle = self.angle - pi |
147 else: | 147 else: |
148 self.sprite.angle = self.angle | 148 self.sprite.angle = self.angle |
149 self.anmrunner = ANMRunner(bt.anm_wrapper, bt.cancel_anim_index, | 149 self.anmrunner = ANMRunner(bt.anm, bt.cancel_anim_index, |
150 self.sprite, bt.launch_anim_offsets[self.sprite_idx_offset]) | 150 self.sprite, bt.launch_anim_offsets[self.sprite_idx_offset]) |
151 self.anmrunner.run_frame() | 151 self.anmrunner.run_frame() |
152 self.dx, self.dy = self.dx / 2., self.dy / 2. | 152 self.dx, self.dy = self.dx / 2., self.dy / 2. |
153 | 153 |
154 self.state = CANCELLED | 154 self.state = CANCELLED |