working some more on enemy movement, they stilldon't always want to move to the sides when they reach the front so still some more work to do. also updated the aiming a bit to clamp the arc for firing and drawing, rewrote the draw arc function

This commit is contained in:
2026-06-07 21:14:46 -04:00
parent 12b565715a
commit 3c9a51bd6a
10 changed files with 144 additions and 39 deletions
+10 -1
View File
@@ -7,8 +7,10 @@ public partial class Enemy : StaticBody2D
{
[Signal]
public delegate void DeathEventHandler(Enemy THIS);
public int _damage = 1, _health = 2, _speed, _visibilityRange = 10;
public bool _hovered = false;
public int _damage = 1, _health = 2, _speed, _speedRemaining, _visibilityRange = 4;
public Vector2I _address, _range = Vector2I.Up;
public List<Vector2I> _path = new();
public float _movement = 0;
public EnemyController _enemyController;
@@ -40,4 +42,11 @@ public partial class Enemy : StaticBody2D
EmitSignal(SignalName.Death, this);
}
}
public void OnMouseEntered(){
_hovered = true;
}
public void OnMouseExited(){
_hovered = true;
}
}