-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.py
34 lines (24 loc) · 1.05 KB
/
run.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
from game.shared.constants import *
from game.casting.cast import Cast
from game.directing.director import Director
from game.scripting.script import Script
from game.scripting.actor_inputs import ActorInputs
from game.scripting.actor_updates import ActorUpdates
from game.scripting.actor_outputs import ActorOutputs
from game.services.keyboard_service import KeyboardService
from game.services.video_service import VideoService
from game.services.audio_service import AudioService
def main():
cast = Cast()
#NOTE: Add all your actors here and add them to the cast instance
keyboard_service = KeyboardService()
video_service = VideoService()
audio_service = AudioService()
script = Script()
script.add_action("input", ActorInputs(keyboard_service, audio_service))
script.add_action("update", ActorUpdates())
script.add_action("output", ActorOutputs(video_service))
director = Director(keyboard_service, video_service, audio_service)
director.start_game(cast, script)
if __name__ == "__main__":
main()