Skip to content

Commit

Permalink
free for all dmg
Browse files Browse the repository at this point in the history
  • Loading branch information
amazliah committed Dec 6, 2023
1 parent 9b1e698 commit 7b27976
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/agent.gd
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ func die():
queue_free()

func _on_body_entered(body: Node):
if is_my_turn and body is MyAgent:
var agent = body as MyAgent
agent.take_damage(current_damage)
if !is_my_turn and body is MyAgent:
var attacker = body as MyAgent
take_damage(attacker.current_damage)

0 comments on commit 7b27976

Please sign in to comment.