1
1
1Tima12018-07-05 20:51:48
Python
1Tima1, 2018-07-05 20:51:48

Possibility of updating?

from time import sleep,time
BUB_CHANCE=10
#MAIN GAME LOOP
while True:
    if randint(1,BUB_CHANCE)==1:
       create_bubble()
    move_bubbles()
    window.update()-обновляет окно,чтобы перерисовать пузыри в новых позициях.
    sleep(0.05)

question - does window.update() update the window only for the bubbles or for all the details? (for example, if I still have another shape and I moved it with the keys, will it return to its original place or stay there?)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Tikhonov, 2018-07-08
@tumbler

The question was asked incorrectly. window - what is it? from which library? custom class?
In general, you need to look at the window.update() code to understand what it does.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question