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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user