Mercurial > touhou
comparison pytouhou/game/background.py @ 17:d940d004b840
Make game.sprite.Sprite use its own frame counter.
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 09 Aug 2011 11:40:13 +0200 |
parents | 66ce9bb440ac |
children | bf225780973f |
comparison
equal
deleted
inserted
replaced
16:66ce9bb440ac | 17:d940d004b840 |
---|---|
48 self.objects = [] | 48 self.objects = [] |
49 for i, obj in enumerate(self.stage.objects): | 49 for i, obj in enumerate(self.stage.objects): |
50 faces = [] | 50 faces = [] |
51 for script_index, ox, oy, oz, width_override, height_override in obj.quads: | 51 for script_index, ox, oy, oz, width_override, height_override in obj.quads: |
52 sprite = Sprite(self.anim, script_index) | 52 sprite = Sprite(self.anim, script_index) |
53 sprite.update(0, width_override, height_override) | 53 sprite.update(width_override, height_override) |
54 uvs, vertices = sprite._uvs, tuple((x + ox, y + oy, z + oz) for x, y, z in sprite._vertices) | 54 uvs, vertices = sprite._uvs, tuple((x + ox, y + oy, z + oz) for x, y, z in sprite._vertices) |
55 faces.append((vertices, uvs)) | 55 faces.append((vertices, uvs)) |
56 self.objects.append(faces) | 56 self.objects.append(faces) |
57 | 57 |
58 | 58 |