Re: [Tutor] Delay Between iterations

2012-01-12 Thread Nate Lastname
Hello ANKUR, Just add a timer variable to the plane class. Every time it is updated, subtract time from the timer. When it hits 0, the bullet can be fired. Else, it cannot. When the bullet is fired, reset the timer to a delay value. It's that simple :) Cheers, Nathanael Lastname. -- My Blo

Re: [Tutor] Delay Between iterations

2012-01-12 Thread ANKUR AGGARWAL
In the last code provided I messed up the Bullet Class Code. Apologies for that. Below is my code : import pygame from pygame.locals import * import random import time pygame.init() screen=pygame.display.set_mode((640,480),0,24) pygame.display.set_caption("Hit The Stone") background=pygame.Surfac

[Tutor] Delay Between iterations

2012-01-12 Thread ANKUR AGGARWAL
import pygame from pygame.locals import * import random pygame.init() screen=pygame.display.set_mode((640,480),0,24) pygame.display.set_caption("Hit The Stone") background=pygame.Surface(screen.get_size()) background=background.convert() screen.blit(background,(0,0)) class Plane(pygame.sprite.Spr