1
콜리 전 인스턴스를 콜리 전 플레이어의 스프라이트로 삭제하기 위해 콜리 전 마스크 체크를 실행 중입니다. 정상적으로 작동합니다.스프 라이트 콜리 전
pygame.sprite.spritecollide(player, mobs, True, pygame.sprite.collide_mask)
내가 힘든 시간을 보내고 있는데 폭발 애니메이션이 특정 'mob in mobs'위치에서 발생하고 있습니다.
minuspoints = pygame.sprite.spritecollide(player, mobs, True, pygame.sprite.collide_mask)
for hit in minuspoints:
life-=5
score+=1
if cash-1>=0:
cash-=1
else:
life-=5
enemies-=1
if moo==0:
collision.play()
ensmallpop.play()
# Check which mob was hit
for m in mobs:
pass
#popAnim
popco = m.update(pos)
어떤 마피아가 맞았는지 어떻게 결정합니까?
나는 1700 줄의 코드를 가지고있다. (아마도 너무 효과적으로 쓰여지지는 않을 것이다.)이 시점에서 나는 이것이 어떻게 작동 할 것인지를 결정하기 위해 머리에 꽤 많은 다른 섹션을 저글링하고있다.
추가 정보가 필요하면 문의하십시오.
미리 감사드립니다.
니스, 그 일을했다. 감사! – TheJack