DEV Community

Discussion on: ( YouTube Tutorial ) Multi-Conditional Booleans For Games

Collapse
 
abhi profile image
Abhi

Hey! Thanks for the reply. Well, the shield and revive were just general examples. If the conditions under which the player is invincible keep increasing with more boosts or bonuses, you will have to keep adding to that OR condition list and can get messy after a point. And this is just one case in your entire game. You can have other booleans which might need to check multiple conditions. With the multi-conditional boolean generic class all you have to do is create a new Enum value for a new condition and just call Set and Reset with that value on the multi-conditional boolean.

Also, you don't have to create any more classes but just the one Multi-Conditional boolean generic class and it works wonders. But it's just my opinion, not trying to say what you doing is wrong.