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