Closed hoichael closed 4 years ago
@hoichael
Add collision_tag
field to player settings' shooter/bullet section.
https://github.com/Noah2610/deathfloor/blob/ffaaa99c72d7e7723128a40078b2628a22febe51/resources/settings/player.ron#L101
The bullet destroys itself when it collides with anything that collides with the bullet's configured collision_tag
.
So we can make bullets destroy themselves when colliding with enemies by adding "Enemy"
to the collision_tag
's collides_with
array.
Or we could create a new collision label like "BulletDestroyer"
to specific enemies' labels, and then make the player bullets collide with "BulletDestroyer"
, so we can have bullets pass through some entities, but not others.
Also add EntityAction(DeleteEntity)
action to delete this entity from an EntityConfig
's event/action thing.
Probably useful when spawning entities (on branch feature/object-spawner
, not merged yet).