Mercurial > touhou
comparison pytouhou/game/laser.py @ 309:14c9aca8e274
Implement Remilia's laser webs.
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Wed, 14 Mar 2012 11:28:15 +0100 |
parents | f3099ebf4f61 |
children | 690b5faaa0e6 |
comparison
equal
deleted
inserted
replaced
308:7a464291dd9d | 309:14c9aca8e274 |
---|---|
38 dx, dy = cos(laser.angle), sin(laser.angle) | 38 dx, dy = cos(laser.angle), sin(laser.angle) |
39 | 39 |
40 self.x = laser.base_pos[0] + offset * dx | 40 self.x = laser.base_pos[0] + offset * dx |
41 self.y = laser.base_pos[1] + offset * dy | 41 self.y = laser.base_pos[1] + offset * dy |
42 | 42 |
43 scale = laser.width / 10. - (offset - laser.start_offset) | 43 scale = laser.width / 10. - (offset - laser.start_offset) #TODO: check |
44 self.sprite.rescale = (scale, scale) | 44 self.sprite.rescale = (scale, scale) |
45 self.sprite.changed = True | 45 self.sprite.changed = True |
46 | 46 |
47 if laser.removed or scale <= 0.: | 47 if laser.removed or scale <= 0.: |
48 self.removed = True | 48 self.removed = True |