Male_zoo_Projekt_SI/constants.py
s481832 9b0ecde75e Dodanie pory dnia
Dodanie sowy i nietoperza
2024-05-10 22:29:08 +02:00

22 lines
697 B
Python

import random
import pygame
import time
class Constants:
def __init__(self):
self.BLACK = (0, 0, 0)
self.RED = (255, 0, 0)
self.GRID_SIZE = 50
self.GRID_WIDTH = 30
self.GRID_HEIGHT = 15
self.WINDOW_SIZE = (self.GRID_WIDTH * self.GRID_SIZE, self.GRID_HEIGHT * self.GRID_SIZE)
self.background_image = pygame.transform.scale(pygame.image.load('images/tło.jpg'), self.WINDOW_SIZE)
self.IS_NIGHT = False
self.TIME_CHANGE = time.time() + 60
self.season = random.choice(["spring", "summer", "autumn", "winter"])
def init_pygame(const):
pygame.init()
const.screen = pygame.display.set_mode(const.WINDOW_SIZE)