Collisions layers and everything

So I do understand how layers and collisions etc work on a basic scale, but im not really liking how things are going as my game gets a bit more complex (Not much more as its only a 2D side shooter)

anyway if i have

Player (Player has 3 weapons: Guns,Bombs and missiles)
Enemies
EnemyBullets
The ground
The heightBorder (Which causes a stall)

obviously the weapons should have different results on their targets, or i would like to add that in later.

take an enemy soldier

currently if he gets shot, he falls over and dies with a light wimper.
If he gets blown up, he screams and explodes in to particles.

im currently doing this on the OnEnterCollision:

if the object tag = “PlayerGun” then do…

if the object tag = “PlayerBomb” then do…

etc etc

is this the right way to go about it? or am i over complicating things?

would be great to get a solid game plan on how all this works.

Also, should the weapon (Bullet, bomb etc) be handling the collision? or should the target its hitting? if that makes any sense. thanks for reading.

here is my latest demo

https://vimeo.com/475602519

most enemies created need to organise layers and collisons now!

1 Like

I think you already have that. Everything you list sounds perfectly reasonable. If something needs to change, it will probably become obvious to you and you can fix it then.