-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnvironments.py
More file actions
43 lines (35 loc) · 1.09 KB
/
Environments.py
File metadata and controls
43 lines (35 loc) · 1.09 KB
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
from Core import *
class FBEnvironment:
gravity = -9.21 * 200
move_speed = 1.4 * 100
min_velocity = gravity * 20
jump_delay = 0.17
y_score_mult = 1
render_part = 0.6 # portion de la fenetre ou le jeu est rendered, le reste (UI) est rendered a gauche
@staticmethod
def set_move_speed(new_speed):
FBEnvironment.move_speed = new_speed
#### Constantes pour l'affichage UI ####
__SWEDISH_COLOR_PALETTE = { # Les couleurs ont étés obtenues ici : https://flatuicolors.com/
"lightest": Color(250, 250, 250),
"light": Color(210, 218, 226),
"darkest": Color(30, 39, 46),
"tone_0": Color(255, 63, 52),
"tone_1": Color(15, 188, 249),
"tone_2": Color(75, 207, 250),
"tone_3": Color(5, 196, 107),
"darker": Color(72, 84, 96),
"midtone": Color(128, 142, 155),
"tone_4": Color(245, 59, 87)
}
__FONTS_1 = {
"title": "arialblack",
"normal": "bahnschrift",
"button": "arialblack"
}
__FONTS = __FONTS_1
__COLORS = __SWEDISH_COLOR_PALETTE
def get_colors(key):
return __COLORS[key]
def get_fonts(key):
return __FONTS[key]