Closed nimshi89 closed 3 years ago
Is this an extension of #24 ?
Yes it is.
Why did you create a new issue then? Rather than adding this to the existing one??? I'll close that one
What branch?
Because I made a new branch because this would be about getting the hitboxes to work and using it as a way to find any enemy objects near to the player.
Which branch?
It was the stats branch. So when the inheritance was made so the classes have functions and base stats I did try to pass some arguments and get the combat working but that didn't work out. I was implementing the inheritance wrong and later of I just didn't come back to that branch :/ sorry I understand this is way more confusing than it should be.
This branch does not seem to have everything in it, like "target" or "main". Have you removed things? Why?
Given the impending deadline, I think you will have to abandon any complex stuff, in favour or simpler approaches. You should know the X,Y location of all objects on screen, so you should just do a look up of that data, rather than trying to do collision; note it is collision, not collusion.
@DoctorMikeReddy
At the init of the player and enemy classes there is a self.hitbox. That could be used to detect collusion and then later be used as an argument for the player's and enemies' attack function. I did try to use the slef.rect function to draw the hitboxes to the screen but it didn't work. I need help with that please cause this way I can't tell how big the hitboxes are. Then some help with a method to detect what colliding with the player's hitbox and that method would return the object that is colliding which then could be used as an argument in the players and enemies attack function.