undergoing a shift to change movement into another action that a peg can perform and giving pegs a list of actions order by priority

This commit is contained in:
2026-06-29 02:43:25 -04:00
parent f6c54e0730
commit ebdff1b200
16 changed files with 148 additions and 110 deletions
+3 -3
View File
@@ -7,19 +7,19 @@ public partial class Shortsword : PegAction
public override void _Ready()
{
base._Ready();
_priority = 1000;
_healthChange = -2;
_cost = 2;
_range = 0;
_usesMax = 1;
_usesRemaining = _usesMax;
}
public override Tween CreateAnimation(Peg PEG)
{
Vector2 target = PEG.GlobalPosition + (Vector2.Up * 50);
Vector2 target = Vector2.Up * PEG._pegController._playArea._map._cellSize;
Tween subtween = CreateTween();
subtween.TweenProperty(_image, "visible", true, 0.0f);
subtween.TweenProperty(_image, "global_position", target, 0.5f);
subtween.TweenProperty(_image, "position", target, 0.5f);
subtween.TweenCallback(Callable.From(() =>
{
PEG._pegController._playerController.ChangeHealth(_healthChange, this);