-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconstantes.py
60 lines (48 loc) · 2.19 KB
/
constantes.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
#-------------------------------------------------------------------------------
# Name: constantes
#
# Author: sl-prog et regisseur
#
# Licence: <GNU GENERAL PUBLIC LICENSE>
#-------------------------------------------------------------------------------
import pygame
from pygame.locals import *
#Dimension ecran
largeur_ecran = 800
hauteur_ecran = 560
#son
sonmenu = pygame.mixer.Sound("sons/menu.wav")
sonjeu = pygame.mixer.Sound("sons/jeu.wav")
sonexplosion = pygame.mixer.Sound("sons/explosion.wav")
songagner = pygame.mixer.Sound("sons/gagner.wav")
#Titre ecran
titre_fenetre = 'Mountain Domination'
fenetre = pygame.display.set_mode((largeur_ecran, hauteur_ecran)) #fenetre de 640*480
icon = "image/interface/icon.png"
pygame.display.set_icon(pygame.image.load(icon))
#bazooka ="image/bazooka" #image arme
grenade = "image/personnages/prj_grenade.png" #image projectile aussi utilisee pour image arme
rocket = "image/personnages/prj_rocket.png" #image projectile
arme1 = pygame.image.load("image/interface/bazooka.png").convert_alpha()
arme2 = pygame.image.load("image/interface/grenade.png").convert_alpha()
chargement0 = pygame.image.load("image/interface/barre0.png").convert_alpha()
chargement1 = pygame.image.load("image/interface/barre1.png").convert_alpha()
chargement2 = pygame.image.load("image/interface/barre2.png").convert_alpha()
chargement3 = pygame.image.load("image/interface/barre3.png").convert_alpha()
chargement4 = pygame.image.load("image/interface/barre4.png").convert_alpha()
horloge = pygame.image.load("image/interface/horloge.png").convert_alpha()
tourjoueur1 = pygame.image.load("image/interface/tourjoueur1.png").convert_alpha()
tourjoueur2 = pygame.image.load("image/interface/tourjoueur2.png").convert_alpha()
congratulations = pygame.image.load("image/interface/congratulations.png")
#initialiser les touches de commande
gauche = False
droite = False
saut = False
angle = ""
tombe1 = "image/personnages/tombe1.png"
tombe2 = "image/personnages/tombe2.png"
expl1 = pygame.image.load("image/armes/expl1.png").convert_alpha()
expl2 = pygame.image.load("image/armes/expl2.png").convert_alpha()
seconde = pygame.time.get_ticks() + 1000
numerorouge = 0 #doit rester a 0
numerobleu = 0