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

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -