Browse Source

exemple

master
laneury.a 2 months ago
parent
commit
3c70a7ff5b
  1. 7
      test.py
  2. 26
      test2opacite.py

7
test.py

@ -0,0 +1,7 @@
b = 0
def calc (a,b, c=1):
res = a+b+c
print(res)
return res
calc(5,3,10)

26
test2opacite.py

@ -0,0 +1,26 @@
import pygame
from pygame.locals import *
pygame.init()
#Création de la fenêtre:
size = [800, 600]
fenetre = pygame.display.set_mode((size), RESIZABLE)
image = pygame.image.load("ton_image.png")
image.fill((255, 255, 255, 125), special_flags=BLEND_RGBA_MULT)
continuer = True
clock = pygame.time.Clock()
while continuer:
for event in pygame.event.get():
if event.type == QUIT:
continuer = False
clock.tick(30)
fenetre.fill(0)
fenetre.blit(image, (100, 100))
pygame.display.flip()
pygame.quit()
Loading…
Cancel
Save