Working with Jennie to adjust enemy identification in bullet.gd script
This commit is contained in:
parent
448009b6e4
commit
aae3238906
3 changed files with 47 additions and 31 deletions
|
|
@ -21,34 +21,31 @@ func _on_area_entered(area: Area2D) -> void:
|
|||
|
||||
var enemies = get_tree().get_nodes_in_group("enemies")
|
||||
|
||||
for enemy in enemies:
|
||||
match enemy.enemy_type:
|
||||
"crt":
|
||||
if area.is_in_group("enemies"):
|
||||
print("CRT hit!")
|
||||
#for enemy in enemies:
|
||||
match enemies.enemy_type:
|
||||
"crt":
|
||||
if area.is_in_group("enemies"):
|
||||
print("CRT hit!")
|
||||
area.hit_detection()
|
||||
queue_free()
|
||||
|
||||
|
||||
"shards":
|
||||
if area.is_in_group("shards"):
|
||||
print("Shards hit!")
|
||||
area.hit_detection()
|
||||
|
||||
"mirror":
|
||||
if area.is_in_group("enemies"):
|
||||
print("Mirror hit!")
|
||||
area.hit_detection()
|
||||
queue_free()
|
||||
|
||||
"chicken":
|
||||
if area.is_in_group("enemies"):
|
||||
print("Chicken hit!")
|
||||
area.hit_detection()
|
||||
queue_free()
|
||||
|
||||
|
||||
"shards":
|
||||
if area.is_in_group("shards"):
|
||||
print("Shards hit!")
|
||||
area.hit_detection()
|
||||
|
||||
|
||||
|
||||
"mirror":
|
||||
if area.is_in_group("enemies"):
|
||||
print("Mirror hit!")
|
||||
area.hit_detection()
|
||||
queue_free()
|
||||
|
||||
|
||||
"chicken":
|
||||
if area.is_in_group("enemies"):
|
||||
print("Chicken hit!")
|
||||
area.hit_detection()
|
||||
queue_free()
|
||||
|
||||
#func bullet_fx():
|
||||
#shader_active = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue