LD56 is over. This is the game.

This commit is contained in:
Douwe Ravers
2024-10-07 02:28:14 +02:00
parent 4c0c57d5ba
commit af7a46cd23
183 changed files with 20357 additions and 442 deletions

View File

@@ -0,0 +1,20 @@
extends Area3D
signal attack
func _on_attack_timer_timeout() -> void:
var ant := get_parent() as Ant
for body in get_overlapping_bodies():
if body is Ant:
var other_ant := body as Ant
if ant is SoldierAnt and other_ant is EnemyAnt:
other_ant.hit(randi_range(0, ant.damage))
attack.emit()
if ant is EnemyAnt and other_ant is not EnemyAnt:
other_ant.hit(randi_range(0, ant.damage))
attack.emit()
for area in get_overlapping_areas():
if area.get_parent() is Building:
var building := area.get_parent() as Building
building.hit(randi_range(0, ant.damage))
attack.emit()