added some more signals for attack hit, enemy and player controllers turn done, commander enemy death, better enemy movement and turn changing, implemented an rng, added functions to grid and gridmarkers to allow for easier searching of markers, more logic for if a tower commander has actions

This commit is contained in:
2026-06-01 02:28:45 -04:00
parent facb2e227e
commit dd14a8da40
13 changed files with 138 additions and 60 deletions
+4 -2
View File
@@ -2,6 +2,9 @@ using Godot;
public partial class Attack : RigidBody2D
{
[Signal]
public delegate void HitEventHandler(Node NODE);
public bool _hovered = false;
public int _damage = 1;
public Vector2 _speed;
@@ -23,10 +26,9 @@ public partial class Attack : RigidBody2D
public void TakeAction(Node BODY)
{
GD.Print("Body Entered");
EmitSignal(SignalName.Hit, BODY);
if (BODY is Enemy enemy)
{
GD.Print("Body Entered is enemy");
enemy.TakeDamage(_damage, _commanderOwner);
}
}