I still have an issue with collision

When the zombie wanna cross the destroy window , they just teleport to the other side after some akward step. I need to fix this.

The first option that i was thinking of is to add property to the collision element to allow specific type of character to cross this element when it’s at true.

Other option would be to disable the collision on the zombie for the time he cross the window i guess.

What i did

So finnally i added a destroy property on the window (could maybe a Component at some point). And when they are attack or repair by the user the state of destroy change and i added a system to react on change on this field to change the value for the accepted character type for the collision of the window.

So now when they are destroy the zombie can pass throw but now the player.

This is ok but the next things that i need to clear and implement more is the health system and handling on this.

Better health system

First i start to add custom system to handle the health change.

I migrate the hit on window to it’s own self contains system. To remove the panel of the windows when zombie hit them. I pretty mutch replace the solution that i did in the previous commit.

How the health system is looking for now is that when you want to apply dommage you change the value in health.tmp_health this is validate by the health system to change the current_health and trigger special event according to the change in health.

I need to port the window panel repairing code to the same system , for now the code is split between two part.