Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Silva <icarito@lonko.(none)>2010-03-30 17:12:08 (GMT)
committer Sebastian Silva <icarito@lonko.(none)>2010-03-30 17:12:08 (GMT)
commit88e598926fd25d82f0946b190fe9784ac1d67b0f (patch)
tree64c8cf0d8d77e5b94e793d9888506ab45bd762da
Commit inicial.
-rwxr-xr-xcirculo.pngbin0 -> 1385 bytes
-rwxr-xr-xcirculo.wavbin0 -> 86136 bytes
-rwxr-xr-xcuadrado.pngbin0 -> 370 bytes
-rwxr-xr-xcuadrado.py68
-rwxr-xr-xcuadrado.pycbin0 -> 3668 bytes
-rwxr-xr-xcuadrado.py~68
-rwxr-xr-xcuadrado.wavbin0 -> 118392 bytes
-rwxr-xr-xcubo.pngbin0 -> 2154 bytes
-rwxr-xr-xcubo.wavbin0 -> 102008 bytes
-rwxr-xr-xcudrado.py~0
-rwxr-xr-xesfera.pngbin0 -> 2809 bytes
-rwxr-xr-xesfera.wavbin0 -> 120440 bytes
-rwxr-xr-xfiguras.py83
-rwxr-xr-xfiguras.py~86
-rwxr-xr-xfondo.pngbin0 -> 9937 bytes
-rwxr-xr-xncirculo.pngbin0 -> 1027 bytes
-rwxr-xr-xncuadrado.pngbin0 -> 1248 bytes
-rwxr-xr-xncubo.pngbin0 -> 949 bytes
-rwxr-xr-xnesfera.pngbin0 -> 1210 bytes
-rwxr-xr-xnrectangulo.pngbin0 -> 1736 bytes
-rwxr-xr-xntriangulo.pngbin0 -> 1341 bytes
-rwxr-xr-xrectangulo.pngbin0 -> 411 bytes
-rwxr-xr-xrectangulo.wavbin0 -> 95864 bytes
-rwxr-xr-xtriangulo.pngbin0 -> 909 bytes
-rwxr-xr-xtriangulo.wavbin0 -> 69240 bytes
25 files changed, 305 insertions, 0 deletions
diff --git a/circulo.png b/circulo.png
new file mode 100755
index 0000000..723088e
--- /dev/null
+++ b/circulo.png
Binary files differ
diff --git a/circulo.wav b/circulo.wav
new file mode 100755
index 0000000..b8790c8
--- /dev/null
+++ b/circulo.wav
Binary files differ
diff --git a/cuadrado.png b/cuadrado.png
new file mode 100755
index 0000000..694a0ac
--- /dev/null
+++ b/cuadrado.png
Binary files differ
diff --git a/cuadrado.py b/cuadrado.py
new file mode 100755
index 0000000..c92e7c4
--- /dev/null
+++ b/cuadrado.py
@@ -0,0 +1,68 @@
+import pygame
+from pygame.locals import *
+from pygame.sprite import Sprite
+
+class Cuadrado(Sprite):
+
+ def __init__(self,x,y):
+ Sprite.__init__(self)
+ self.image = pygame.image.load("cuadrado.png").convert_alpha()
+ self.rect = self.image.get_rect()
+ self.rect.move_ip(x,y)
+
+ def update(self):
+ pass
+
+class Rectangulo(Sprite):
+
+ def __init__(self,x,y):
+ Sprite.__init__(self)
+ self.image = pygame.image.load("rectangulo.png").convert_alpha()
+ self.rect = self.image.get_rect()
+ self.rect.move_ip(x,y)
+
+ def update(self):
+ pass
+
+class Circulo(Sprite):
+ def __init__(self,x,y):
+ Sprite.__init__(self)
+ self.image = pygame.image.load("circulo.png").convert_alpha()
+ self.rect = self.image.get_rect()
+ self.rect.move_ip(x,y)
+
+ def update(self):
+ pass
+
+class Cubo(Sprite):
+
+ def __init__(self,x,y):
+ Sprite.__init__(self)
+ self.image = pygame.image.load("cubo.png").convert_alpha()
+ self.rect = self.image.get_rect()
+ self.rect.move_ip(x,y)
+
+ def update(self):
+ pass
+
+class Triangulo(Sprite):
+
+ def __init__(self,x,y):
+ Sprite.__init__(self)
+ self.image = pygame.image.load("triangulo.png").convert_alpha()
+ self.rect = self.image.get_rect()
+ self.rect.move_ip(x,y)
+
+ def update(self):
+ pass
+
+class Esfera(Sprite):
+
+ def __init__(self,x,y):
+ Sprite.__init__(self)
+ self.image = pygame.image.load("esfera.png").convert_alpha()
+ self.rect = self.image.get_rect()
+ self.rect.move_ip(x,y)
+
+ def update(self):
+ pass
diff --git a/cuadrado.pyc b/cuadrado.pyc
new file mode 100755
index 0000000..caca29f
--- /dev/null
+++ b/cuadrado.pyc
Binary files differ
diff --git a/cuadrado.py~ b/cuadrado.py~
new file mode 100755
index 0000000..c92e7c4
--- /dev/null
+++ b/cuadrado.py~
@@ -0,0 +1,68 @@
+import pygame
+from pygame.locals import *
+from pygame.sprite import Sprite
+
+class Cuadrado(Sprite):
+
+ def __init__(self,x,y):
+ Sprite.__init__(self)
+ self.image = pygame.image.load("cuadrado.png").convert_alpha()
+ self.rect = self.image.get_rect()
+ self.rect.move_ip(x,y)
+
+ def update(self):
+ pass
+
+class Rectangulo(Sprite):
+
+ def __init__(self,x,y):
+ Sprite.__init__(self)
+ self.image = pygame.image.load("rectangulo.png").convert_alpha()
+ self.rect = self.image.get_rect()
+ self.rect.move_ip(x,y)
+
+ def update(self):
+ pass
+
+class Circulo(Sprite):
+ def __init__(self,x,y):
+ Sprite.__init__(self)
+ self.image = pygame.image.load("circulo.png").convert_alpha()
+ self.rect = self.image.get_rect()
+ self.rect.move_ip(x,y)
+
+ def update(self):
+ pass
+
+class Cubo(Sprite):
+
+ def __init__(self,x,y):
+ Sprite.__init__(self)
+ self.image = pygame.image.load("cubo.png").convert_alpha()
+ self.rect = self.image.get_rect()
+ self.rect.move_ip(x,y)
+
+ def update(self):
+ pass
+
+class Triangulo(Sprite):
+
+ def __init__(self,x,y):
+ Sprite.__init__(self)
+ self.image = pygame.image.load("triangulo.png").convert_alpha()
+ self.rect = self.image.get_rect()
+ self.rect.move_ip(x,y)
+
+ def update(self):
+ pass
+
+class Esfera(Sprite):
+
+ def __init__(self,x,y):
+ Sprite.__init__(self)
+ self.image = pygame.image.load("esfera.png").convert_alpha()
+ self.rect = self.image.get_rect()
+ self.rect.move_ip(x,y)
+
+ def update(self):
+ pass
diff --git a/cuadrado.wav b/cuadrado.wav
new file mode 100755
index 0000000..d703fbe
--- /dev/null
+++ b/cuadrado.wav
Binary files differ
diff --git a/cubo.png b/cubo.png
new file mode 100755
index 0000000..e827bd5
--- /dev/null
+++ b/cubo.png
Binary files differ
diff --git a/cubo.wav b/cubo.wav
new file mode 100755
index 0000000..c0be922
--- /dev/null
+++ b/cubo.wav
Binary files differ
diff --git a/cudrado.py~ b/cudrado.py~
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/cudrado.py~
diff --git a/esfera.png b/esfera.png
new file mode 100755
index 0000000..513b197
--- /dev/null
+++ b/esfera.png
Binary files differ
diff --git a/esfera.wav b/esfera.wav
new file mode 100755
index 0000000..799138c
--- /dev/null
+++ b/esfera.wav
Binary files differ
diff --git a/figuras.py b/figuras.py
new file mode 100755
index 0000000..10b28ca
--- /dev/null
+++ b/figuras.py
@@ -0,0 +1,83 @@
+import pygame
+from pygame.locals import *
+from pygame.sprite import Sprite
+from cuadrado import *
+
+pygame.mixer.init()
+pygame.font.init()
+
+
+salir = False
+
+screen = pygame.display.set_mode((640,480))
+pygame.display.set_caption("^__^")
+fondo = pygame.image.load("fondo.png").convert_alpha()
+
+pygame.mouse.set_visible(True)
+
+sprites = pygame.sprite.OrderedUpdates()
+cuadrado = pygame.sprite.Group()
+rectangulo = pygame.sprite.Group()
+triangulo = pygame.sprite.Group()
+circulo = pygame.sprite.Group()
+esfera = pygame.sprite.Group()
+cubo = pygame.sprite.Group()
+
+cuadrado.add([Cuadrado(102, 340)])
+rectangulo.add([Rectangulo(397, 340)])
+triangulo.add([Triangulo(247, 340)])
+circulo.add([Circulo(20, 340)])
+esfera.add([Esfera(314, 340)])
+cubo.add([Cubo(182, 340)])
+sprites.add([cuadrado,rectangulo,triangulo,circulo,esfera,cubo])
+temporizador = pygame.time.Clock()
+
+while not salir:
+ sprites.update()
+
+ m = pygame.mouse.get_pressed()
+
+ if m[0] == 1:
+
+ (mouse_x,mouse_y) = pygame.mouse.get_pos()
+
+ if (mouse_x > 102 and mouse_x < 182) and (mouse_y > 340 and mouse_y < 420):
+ glu = pygame.mixer.Sound("cuadrado.wav")
+ glu.play()
+
+ if(mouse_x > 397 and mouse_x < 477)and(mouse_y > 340 and mouse_y < 420):
+ glu = pygame.mixer.Sound("rectangulo.wav")
+ glu.play()
+
+ if(mouse_x > 247 and mouse_x < 327)and(mouse_y > 340 and mouse_y < 420):
+ glu = pygame.mixer.Sound("triangulo.wav")
+ glu.play()
+
+ if(mouse_x > 20 and mouse_x < 100)and(mouse_y > 340 and mouse_y < 420):
+ glu = pygame.mixer.Sound("circulo.wav")
+ glu.play()
+
+ if(mouse_x > 314 and mouse_x < 394)and(mouse_y > 340 and mouse_y < 420):
+ glu = pygame.mixer.Sound("esfera.wav")
+ glu.play()
+
+ if(mouse_x > 182 and mouse_x < 262)and(mouse_y > 340 and mouse_y < 420):
+ glu = pygame.mixer.Sound("cubo.wav")
+ glu.play()
+
+
+ screen.blit(fondo,(0, 0))
+ sprites.draw(screen)
+ pygame.display.flip()
+
+ temporizador.tick(60)
+ # gestion de eventos
+ for e in pygame.event.get():
+ if e.type == pygame.QUIT:
+ salir = True
+ elif e.type == pygame.KEYDOWN:
+ if e.unicode == 'q':
+ salir = True
+ elif e.unicode == 'f':
+ pygame.display.toggle_fullscreen()
+
diff --git a/figuras.py~ b/figuras.py~
new file mode 100755
index 0000000..698d7cd
--- /dev/null
+++ b/figuras.py~
@@ -0,0 +1,86 @@
+import pygame
+from pygame.locals import *
+from pygame.sprite import Sprite
+from cuadrado import *
+
+pygame.mixer.init()
+pygame.font.init()
+
+
+salir = False
+
+screen = pygame.display.set_mode((640,480))
+pygame.display.set_caption("^__^")
+fondo = pygame.image.load("fondo.png").convert_alpha()
+
+pygame.mouse.set_visible(True)
+
+sprites = pygame.sprite.OrderedUpdates()
+cuadrado = pygame.sprite.Group()
+rectangulo = pygame.sprite.Group()
+triangulo = pygame.sprite.Group()
+circulo = pygame.sprite.Group()
+esfera = pygame.sprite.Group()
+cubo = pygame.sprite.Group()
+
+cuadrado.add([Cuadrado(102, 340)])
+rectangulo.add([Rectangulo(397, 340)])
+triangulo.add([Triangulo(247, 340)])
+circulo.add([Circulo(20, 340)])
+esfera.add([Esfera(314, 340)])
+cubo.add([Cubo(182, 340)])
+sprites.add([cuadrado,rectangulo,triangulo,circulo,esfera,cubo])
+temporizador = pygame.time.Clock()
+
+while not salir:
+ sprites.update()
+
+ m = pygame.mouse.get_pressed()
+
+ if m[0] == 1:
+
+ (mouse_x,mouse_y) = pygame.mouse.get_pos()
+
+ if (mouse_x > 102 and mouse_x < 182) and (mouse_y > 340 and mouse_y < 420):
+ glu = pygame.mixer.Sound("cuadrado.wav")
+ n=pygame.image.load("ncuadrado.png")
+ re = n.get_rect()
+ re.move_ip(100,100)
+ glu.play()
+
+ if(mouse_x > 397 and mouse_x < 477)and(mouse_y > 340 and mouse_y < 420):
+ glu = pygame.mixer.Sound("rectangulo.wav")
+ glu.play()
+
+ if(mouse_x > 247 and mouse_x < 327)and(mouse_y > 340 and mouse_y < 420):
+ glu = pygame.mixer.Sound("triangulo.wav")
+ glu.play()
+
+ if(mouse_x > 20 and mouse_x < 100)and(mouse_y > 340 and mouse_y < 420):
+ glu = pygame.mixer.Sound("circulo.wav")
+ glu.play()
+
+ if(mouse_x > 314 and mouse_x < 394)and(mouse_y > 340 and mouse_y < 420):
+ glu = pygame.mixer.Sound("esfera.wav")
+ glu.play()
+
+ if(mouse_x > 182 and mouse_x < 262)and(mouse_y > 340 and mouse_y < 420):
+ glu = pygame.mixer.Sound("cubo.wav")
+ glu.play()
+
+
+ screen.blit(fondo,(0, 0))
+ sprites.draw(screen)
+ pygame.display.flip()
+
+ temporizador.tick(60)
+ # gestion de eventos
+ for e in pygame.event.get():
+ if e.type == pygame.QUIT:
+ salir = True
+ elif e.type == pygame.KEYDOWN:
+ if e.unicode == 'q':
+ salir = True
+ elif e.unicode == 'f':
+ pygame.display.toggle_fullscreen()
+
diff --git a/fondo.png b/fondo.png
new file mode 100755
index 0000000..d145089
--- /dev/null
+++ b/fondo.png
Binary files differ
diff --git a/ncirculo.png b/ncirculo.png
new file mode 100755
index 0000000..0b76115
--- /dev/null
+++ b/ncirculo.png
Binary files differ
diff --git a/ncuadrado.png b/ncuadrado.png
new file mode 100755
index 0000000..b415214
--- /dev/null
+++ b/ncuadrado.png
Binary files differ
diff --git a/ncubo.png b/ncubo.png
new file mode 100755
index 0000000..d889e93
--- /dev/null
+++ b/ncubo.png
Binary files differ
diff --git a/nesfera.png b/nesfera.png
new file mode 100755
index 0000000..c89a4ab
--- /dev/null
+++ b/nesfera.png
Binary files differ
diff --git a/nrectangulo.png b/nrectangulo.png
new file mode 100755
index 0000000..7042ae2
--- /dev/null
+++ b/nrectangulo.png
Binary files differ
diff --git a/ntriangulo.png b/ntriangulo.png
new file mode 100755
index 0000000..4a99509
--- /dev/null
+++ b/ntriangulo.png
Binary files differ
diff --git a/rectangulo.png b/rectangulo.png
new file mode 100755
index 0000000..ad9c315
--- /dev/null
+++ b/rectangulo.png
Binary files differ
diff --git a/rectangulo.wav b/rectangulo.wav
new file mode 100755
index 0000000..ca67c25
--- /dev/null
+++ b/rectangulo.wav
Binary files differ
diff --git a/triangulo.png b/triangulo.png
new file mode 100755
index 0000000..f375090
--- /dev/null
+++ b/triangulo.png
Binary files differ
diff --git a/triangulo.wav b/triangulo.wav
new file mode 100755
index 0000000..99fa508
--- /dev/null
+++ b/triangulo.wav
Binary files differ