You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(original)
if event.type == pygame.MOUSEBUTTONDOWN:
my_bullet = myaircraft.shot()
if my_bullet:
my_bullets_group.add(my_bullet)
(change)
#if event.type == pygame.MOUSEBUTTONDOWN:
my_bullet = myaircraft.shot()
if my_bullet:
my_bullets_group.add(my_bullet)
我从鼠标的点击中删除了子弹,从而改变了我的目标。 我想加快我的拍摄速度,但是我该怎么办呢?
I deleted the shot from the click of the mouse and changed it so that I could shoot while I was still. I want to speed up my shooting, but what code should I change?
The text was updated successfully, but these errors were encountered:
class aircraftSprite(pygame.sprite.Sprite):
def __init__(self, color, bullet_color, **kwargs):
...
# 子弹是否在冷却中
self.is_cooling = False
self.init_count = 35 --> the value you should adjust
self.cooling_count = self.init_count
...
If I didn't misunderstand your question, the question is about Game13 ?
You could adjust the value of init_count in the class aircraftSprite which defined in utils.py. The smaller, the faster.
(original)
if event.type == pygame.MOUSEBUTTONDOWN:
my_bullet = myaircraft.shot()
if my_bullet:
my_bullets_group.add(my_bullet)
(change)
#if event.type == pygame.MOUSEBUTTONDOWN:
my_bullet = myaircraft.shot()
if my_bullet:
my_bullets_group.add(my_bullet)
我从鼠标的点击中删除了子弹,从而改变了我的目标。 我想加快我的拍摄速度,但是我该怎么办呢?
I deleted the shot from the click of the mouse and changed it so that I could shoot while I was still. I want to speed up my shooting, but what code should I change?
The text was updated successfully, but these errors were encountered: