How do you delay specific events in a while loop?

前端 未结 3 1190
一个人的身影
一个人的身影 2020-12-22 09:41

Recently I\'ve been working with a simple and straightforward RPG in python with pygame, but I\'m having some problems delaying specific events. Running the

3条回答
  •  礼貌的吻别
    2020-12-22 10:30

    If you know how much time you need, you can simply add:

    from time import sleep
    ...
    sleep(0.1)
    

    This will add a 100 milliseconds delay

提交回复
热议问题