Mercurial > touhou
comparison pytouhou/game/game.py @ 122:174324a4da51
Add support for launch animations! (Warning: slow :()
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sat, 10 Sep 2011 01:26:30 +0200 |
parents | c7847bfed427 |
children | d1c82d43bbf3 |
comparison
equal
deleted
inserted
replaced
121:1bc0ad774ed4 | 122:174324a4da51 |
---|---|
20 from pytouhou.game.enemy import Enemy | 20 from pytouhou.game.enemy import Enemy |
21 | 21 |
22 | 22 |
23 class GameState(object): | 23 class GameState(object): |
24 __slots__ = ('resource_loader', 'bullets', 'players', 'rank', 'difficulty', 'frame', | 24 __slots__ = ('resource_loader', 'bullets', 'players', 'rank', 'difficulty', 'frame', |
25 'stage', 'boss', 'prng') | 25 'stage', 'boss', 'prng', 'bullet_types') |
26 def __init__(self, resource_loader, players, stage, rank, difficulty): | 26 def __init__(self, resource_loader, players, stage, rank, difficulty, bullet_types): |
27 self.resource_loader = resource_loader | 27 self.resource_loader = resource_loader |
28 | |
29 self.bullet_types = bullet_types | |
28 | 30 |
29 self.bullets = [] | 31 self.bullets = [] |
30 | 32 |
31 self.stage = stage | 33 self.stage = stage |
32 self.players = players | 34 self.players = players |
37 self.frame = 0 | 39 self.frame = 0 |
38 | 40 |
39 | 41 |
40 | 42 |
41 class Game(object): | 43 class Game(object): |
42 def __init__(self, resource_loader, players, stage, rank, difficulty): | 44 def __init__(self, resource_loader, players, stage, rank, difficulty, bullet_types): |
43 self.game_state = GameState(resource_loader, players, stage, rank, difficulty) | 45 self.game_state = GameState(resource_loader, players, stage, rank, difficulty, bullet_types) |
44 | 46 |
45 self.enemies = [] | 47 self.enemies = [] |
46 | 48 |
47 self.bonuses = [] | 49 self.bonuses = [] |
48 | 50 |