-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.py
executable file
·83 lines (76 loc) · 2.28 KB
/
configuration.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
class Configuration(object):
def __init__(self, level):
self.level = level
def configure(self):
self.processors = [
self.level.expiration_processor,
# process all controls, both by the player, and by the AI
self.level.action_processor,
self.level.update_processor,
self.level.collision_processor,
self.level.expiration_processor,
# actually fire bullets, since now final locations of turrets are known
self.level.action_post_processor,
self.level.particle_processor,
self.level.sound_processor
]
self.sound_groups = [
self.level.mines,
]
# these are updated IN ORDER
self.updateable_groups = [
# tanks must be before turrets!
self.level.enemies,
self.level.enemy_turrets,
self.level.player_tanks,
self.level.player_turrets,
self.level.bullets,
self.level.shockwaves,
self.level.explosions,
self.level.powerups,
self.level.powerup_particles,
self.level.trail_particles,
self.level.shields,
self.level.mines,
]
# these are updated IN ORDER
self.expirable_groups = [
self.level.powerup_particles,
self.level.trail_particles,
self.level.shields,
self.level.shockwaves,
self.level.explosions,
self.level.enemy_ai,
self.level.enemy_turret_ai,
self.level.player_tanks,
self.level.player_turrets,
self.level.powerups,
self.level.mines,
self.level.bullets,
]
# order shouldn't matter here
self.expirables_with_expire_actions = [
self.level.shields,
self.level.powerups,
self.level.mines,
]
self.processors_with_delta = [
self.level.action_processor,
self.level.update_processor,
]
self.drawables = [
self.level.non_solid,
self.level.mines,
self.level.player_tanks,
self.level.player_turrets,
self.level.enemies,
self.level.enemy_turrets,
self.level.shockwaves,
self.level.explosions,
self.level.solid,
self.level.bullets,
self.level.powerups,
self.level.shields,
self.level.powerup_particles,
self.level.trail_particles,
]