-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path01_open_window.py
More file actions
43 lines (30 loc) · 788 Bytes
/
Copy path01_open_window.py
File metadata and controls
43 lines (30 loc) · 788 Bytes
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
"""
Platformer Game
"""
import arcade
# Constants
SCREEN_WIDTH = 1000
SCREEN_HEIGHT = 650
SCREEN_TITLE = "Bird Boy"
class MyGame(arcade.Window):
"""
Main application class.
"""
def __init__(self):
# Call the parent class and set up the window
super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
arcade.set_background_color(arcade.csscolor.AQUAMARINE)
def setup(self):
""" Set up the game here. Call this function to restart the game. """
pass
def on_draw(self):
""" Render the screen. """
arcade.start_render()
# Code to draw the screen goes here
def main():
""" Main method """
window = MyGame()
window.setup()
arcade.run()
if __name__ == "__main__":
main()