Code:
import pygame, importedfunctions, random pygame.init() clock = pygame.time.Clock() screen = pygame.display.set_mode([640,480]) class BallClass(pygame.sprite.Sprite): def __init__(self, x,y): pygame.sprite.Sprite.__init__(self)
import pygame, importedfunctions, random pygame.init() clock = pygame.time.Clock() screen = pygame.display.set_mode([640,480]) class BallClass(pygame.sprite.Sprite): def __init__(self, x,y): pygame.sprite.Sprite.__init__(self)
pseudocode --- if event.type == pygame.MOUSEBUTTONDOWN: if mouseRect(imageRect.bottomleft): action1() if mouseRect(imageRect.bottomright): action2()
from distutils.core import setup import py2exe setup(console=['SKPD.py'])
#------------------------------------------------------------------------------- # Name: module3 # Purpose: # # Author: office # # Created: 02/03/2012 # Copyright: (c) office 2012 # Licence: <your
ball1 = [ 100 ,50 , 1, 0] def ball (x,y,movex,movey): if x < 0 : x * -1 if x > 580: x= x* -1 if y < 0: y = y* -1 if y > 260: y = y*-1 x+= movex