|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
bullet2 = []
bullet2_index = 0
BULLET2_NUM = 8
for i in range(BULLET2_NUM//2):#8个子弹除以二是四次每次添加两个
bullet2.append(bullet.Bullet2((me.rect.centerx-33,me.rect.centery)))
bullet2.append(bullet.Bullet2((me.rect.centerx+30,me.rect.centery)))
bullets[bullet2_index].reset((me.rect.centerx-33,me.rect.centery))
bullets[bullet2_index+1].reset((me.rect.centerx+33,me.rect.centery))
bullet2_index = (bullet2_index + 2)%BULLET2_NUM
这个[]里边到底怎么排列的 为什么索引的时候用index和index+1错开调用
bullet2.append(bullet.Bullet2((me.rect.centerx-33,me.rect.centery)))
bullet2.append(bullet.Bullet2((me.rect.centerx+30,me.rect.centery)))
就是让你放子弹的
|
|