starting to work on enemy attacks and player health
This commit is contained in:
@@ -12,7 +12,7 @@ public partial class Enemy : StaticBody2D
|
||||
[Signal]
|
||||
public delegate void RightClickedEventHandler(Enemy THIS);
|
||||
public bool _hovered = false, _track = false;
|
||||
public int _damage = 1, _health = 2, _speed, _speedRemaining, _visibilityRange = 4, _hitRange = 1;
|
||||
public int _damage = 1, _health = 2, _speed, _speedRemaining, _visibilityRange = 4, _hitRange;
|
||||
public Vector2I _address = -Vector2I.One, _range = Vector2I.Up;
|
||||
public List<Vector2I> _path = new();
|
||||
public float _movement = 0;
|
||||
@@ -43,9 +43,9 @@ public partial class Enemy : StaticBody2D
|
||||
base._PhysicsProcess(delta);
|
||||
}
|
||||
|
||||
public void Attack(Commander COMMANDER)
|
||||
public void Attack(PlayerController PLAYER)
|
||||
{
|
||||
COMMANDER.TakeDamage(_damage, this);
|
||||
PLAYER.ChangeHealth(-1, this);
|
||||
}
|
||||
|
||||
public void CounterAttack(Commander COMMANDER)
|
||||
|
||||
Reference in New Issue
Block a user