Cosmetic changes. Renamed part_main.py to test_main.py.
This commit is contained in:
33
part_main.py
33
part_main.py
@@ -1,33 +0,0 @@
|
||||
import pygame
|
||||
from particle import ParticleSystem
|
||||
|
||||
def main():
|
||||
pygame.init()
|
||||
pantalla=pygame.display.set_mode([600,400])
|
||||
salir=False
|
||||
reloj1=pygame.time.Clock()
|
||||
|
||||
blanco=(255,255,255)
|
||||
|
||||
ps = ParticleSystem(0, "Test", 'gfx/burbuja.png')
|
||||
ps.start()
|
||||
|
||||
while not salir:
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT:
|
||||
salir=True
|
||||
if event.type == pygame.KEYDOWN:
|
||||
if event.key == pygame.K_ESCAPE:
|
||||
salir = True
|
||||
|
||||
ps.update()
|
||||
|
||||
pantalla.fill(blanco)
|
||||
ps.draw(pantalla)
|
||||
pygame.display.update()
|
||||
|
||||
reloj1.tick(60)
|
||||
|
||||
pygame.quit()
|
||||
|
||||
main()
|
@@ -1,3 +1,6 @@
|
||||
############################################
|
||||
# Created on 1-10-2013. Miguel Angel Astor #
|
||||
############################################
|
||||
import math
|
||||
import random
|
||||
|
||||
|
38
test_main.py
Executable file
38
test_main.py
Executable file
@@ -0,0 +1,38 @@
|
||||
#! /usr/bin/env python
|
||||
############################################
|
||||
# Created on 1-10-2013. Miguel Angel Astor #
|
||||
############################################
|
||||
import pygame
|
||||
from particle import ParticleSystem
|
||||
|
||||
def main():
|
||||
pygame.init()
|
||||
pantalla = pygame.display.set_mode([600,400])
|
||||
done = False
|
||||
clock = pygame.time.Clock()
|
||||
|
||||
white = (255,255,255)
|
||||
|
||||
ps = ParticleSystem(0, "Test", 'gfx/burbuja.png')
|
||||
ps.start()
|
||||
|
||||
while not done:
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT:
|
||||
done = True
|
||||
if event.type == pygame.KEYDOWN:
|
||||
if event.key == pygame.K_ESCAPE:
|
||||
done = True
|
||||
|
||||
ps.update()
|
||||
|
||||
screen.fill(white)
|
||||
ps.draw(screen)
|
||||
pygame.display.update()
|
||||
|
||||
clock.tick(60)
|
||||
|
||||
pygame.quit()
|
||||
|
||||
if __name__ =="__main__":
|
||||
main()
|
Reference in New Issue
Block a user