diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-04-22 16:34:25 +0200 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-04-22 16:34:25 +0200 |
commit | c8a316e4b8987dad963656a34665fa0e23dedcb1 (patch) | |
tree | 569af4b4f37d21079b6aedfad5164e94b50b6cb8 /Scenes/Entities/Bombs | |
parent | f27937e6e9b6a7146dd09fc711d2d293ecf5abbf (diff) |
update
Diffstat (limited to 'Scenes/Entities/Bombs')
-rw-r--r-- | Scenes/Entities/Bombs/Bomb.gd | 8 | ||||
-rw-r--r-- | Scenes/Entities/Bombs/Explosion.gd | 2 | ||||
-rw-r--r-- | Scenes/Entities/Bombs/Explosion.tscn | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/Scenes/Entities/Bombs/Bomb.gd b/Scenes/Entities/Bombs/Bomb.gd index 3981122..4256fc5 100644 --- a/Scenes/Entities/Bombs/Bomb.gd +++ b/Scenes/Entities/Bombs/Bomb.gd @@ -84,9 +84,11 @@ func explode(): collision_type = self._on_collide_group_bombs() elif collider.is_in_group("breakables"): collision_type = self._on_collide_group_breakables() + elif collider.is_in_group("hitables"): + collision_type = self._on_collide_group_hitables() else: collision_type = self._on_collide_group_else() - + # progress loop based on collision type if collision_type == EXPLOSION_COLLISION_TYPE.STOP: break @@ -178,5 +180,9 @@ func _on_collide_group_breakables(): return EXPLOSION_COLLISION_TYPE.HIT_STOP +func _on_collide_group_hitables(): + return EXPLOSION_COLLISION_TYPE.HIT_CONTINUE + + func _on_collide_group_else(): return EXPLOSION_COLLISION_TYPE.STOP diff --git a/Scenes/Entities/Bombs/Explosion.gd b/Scenes/Entities/Bombs/Explosion.gd index eba8b29..56524e3 100644 --- a/Scenes/Entities/Bombs/Explosion.gd +++ b/Scenes/Entities/Bombs/Explosion.gd @@ -1,5 +1,7 @@ extends Area2D +class_name Explosion + func _ready(): add_to_group("explosions") diff --git a/Scenes/Entities/Bombs/Explosion.tscn b/Scenes/Entities/Bombs/Explosion.tscn index 2521dfb..75740ad 100644 --- a/Scenes/Entities/Bombs/Explosion.tscn +++ b/Scenes/Entities/Bombs/Explosion.tscn @@ -49,7 +49,7 @@ radius = 7.5 [node name="Explosion" type="Area2D"] collision_layer = 32 -collision_mask = 62 +collision_mask = 126 script = ExtResource("2") [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] |