Skip to content

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

Open

Description

@DEBAYAN2011
No description provided.

Activity

  1. DEBAYAN2011 commented on Sep 19, 2019

    @DEBAYAN2011
    Author

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

  2. stefan-muri commented on Sep 24, 2019

    @stefan-muri
    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

  3. PrajjwalDatir commented on May 8, 2020

    @PrajjwalDatir

    Issue is closed I guess?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions