python - Blitting an image according to countdown -
i making game using python 3.5.1/pygame, , need animate drop falls ceiling. original code:
def dropping(x,starty,endy,speed): if drip == true: index in range(starty,endy,speed): screen.blit(drop,(x,index)) while insert_variable_here == true: dropping(x,starty,endy,speed) pygame.display.update() this code blits of @ once instead of waiting next loop of "insert_variable_here". how can fix this?
well try storing countdown string using if statements determine image blit.
(i haven't used pygame months , have forgotten how blit, idea)
import time import pygame *code here* countdown = str(your countdown code) if countdown > 60: blit image
Comments
Post a Comment