Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue of Goblin Being not visible but still getting hit by bullet,hence increasing scores. #3

Open
DEBAYAN2011 opened this issue Sep 19, 2019 · 3 comments

Comments

@DEBAYAN2011
Copy link

No description provided.

@DEBAYAN2011
Copy link
Author

Even the bullets not passing across the goblin even after he is dead,creating an invisible line

@PhaneSchema
Copy link

for bullet in bullets:
    if bullet.y -bullet.radius < goblin.hitbox[1]+ goblin.hitbox[3]and bullet.y+ bullet.radius > goblin.hitbox[1]:
        if bullet.x + bullet.radius > goblin.hitbox[0] and bullet.x-bullet.radius < goblin.hitbox[0] + goblin.hitbox[2]:
            goblin.hit()
            if (goblin.visible):
                bullets.pop(bullets.index(bullet))
                score+=1

this is in the main loop, just add my if statement and it should do the trick

@PrajjwalDatir
Copy link

Issue is closed I guess?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants