mx0c/super-mario-python

Koopa shell only kills Mario

deltea opened this issue · 6 comments

When you step on a Koopa character and make it move, it only kills the player when you hit it, but not the other enemies

I can try to do it! If you assign me I will start working on it

In which class should the collision be happening?

mx0c commented

@Veguinho Sure, you should look into entities/Koopa.py, traits/LeftRightWalkTrait.py & classes/Collider.py.

Got it! It was farely easy to do. Just added a collider checker inside the Goomba and Koopa classes!
Now I need to add the sound of when they die. Could you open another issue for me to add the sound too? That would help me get some more points for the hacktober fest :)

mx0c commented

Great, what you also could do is to make this system more general so if a new enemy type is added to the game you just f.e. inherit from a baseclass achieve this functionality.

Yeah this is a good idea! I'm gonna try doing that too.