Skip to content
Snippets Groups Projects
Commit 86b2c0e2 authored by DUCHMANN LEO's avatar DUCHMANN LEO
Browse files

Nouveaux dossiers

parent b274e5cf
Branches
No related merge requests found
import pygame, time, random, os
from datetime import date
pygame.init()
pygame.display.set_caption("Climate Simulator : Global Organization")
screen = pygame.display.set_mode((0,0), pygame.FULLSCREEN)
#on récupère le mois actuelle pour le faire commencer à ce moment
class month:
def __init__ (self, str):
self.month = str
current_month = month(date.today().strftime("%b"))
#background (2è scène)
background = pygame.image.load('assets/accueil.jpg')
background = pygame.transform.scale(background, (screen.get_width(), screen.get_height()))
#bannière
banner = pygame.image.load('assets/banner.png')
banner = pygame.transform.scale(banner, (500,500))
banner_rect = banner.get_rect()
banner_rect.x = screen.get_width() / 4
#bouton
play_button = pygame.image.load('assets/button.png')
play_button = pygame.transform.scale(play_button,(400,150))
play_button_rect = play_button.get_rect()
play_button_rect.x = screen.get_width() / 2.8
play_button_rect.y = screen.get_height() / 2.4
#buisson
bush = pygame.image.load('assets/buisson.png')
#cadenas
lock = pygame.image.load('assets/cadenas.png')
screen.blit(background, (0,0))
screen.blit(play_button, play_button_rect)
screen.blit(bush, (100,100))
screen.blit(lock, (bush.get_width()/2,bush.get_height()/2+40))
pygame.display.update()
#après l'appui de start
time.sleep(2)
screen.fill((0,0,0))
pygame.display.flip()
time.sleep(2)
\ No newline at end of file
class Temps:
def _init_ (self):
self.
\ No newline at end of file
assets/accueil.jpg

378 KiB

assets/banner.png

176 KiB

assets/buisson.png

44.9 KiB

assets/button.png

120 KiB

assets/cadenas.png

3 KiB

assets/grange.webp

42.7 KiB

0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment