still some bug fixes to work out but not sure how to duplicate them? starting to work on enemy attacks
This commit is contained in:
@@ -9,8 +9,10 @@ public partial class Enemy : StaticBody2D
|
||||
public delegate void DeathEventHandler(Enemy THIS);
|
||||
[Signal]
|
||||
public delegate void ClickedEventHandler(Enemy THIS);
|
||||
[Signal]
|
||||
public delegate void RightClickedEventHandler(Enemy THIS);
|
||||
public bool _hovered = false, _track = false;
|
||||
public int _damage = 1, _health = 2, _speed, _speedRemaining, _visibilityRange = 4;
|
||||
public int _damage = 1, _health = 2, _speed, _speedRemaining, _visibilityRange = 4, _hitRange = 1;
|
||||
public Vector2I _address = -Vector2I.One, _range = Vector2I.Up;
|
||||
public List<Vector2I> _path = new();
|
||||
public float _movement = 0;
|
||||
@@ -30,6 +32,10 @@ public partial class Enemy : StaticBody2D
|
||||
{
|
||||
EmitSignal(SignalName.Clicked, this);
|
||||
}
|
||||
if (Input.IsActionJustPressed("rightClick"))
|
||||
{
|
||||
EmitSignal(SignalName.RightClicked, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void _PhysicsProcess(double delta)
|
||||
|
||||
Reference in New Issue
Block a user