implemented visibility, so pegs can only scope out as far as they can see.
This commit is contained in:
@@ -9,7 +9,6 @@ public partial class Shortsword : PegAction
|
||||
base._Ready();
|
||||
_category = "attack";
|
||||
_priority = 1;
|
||||
_healthChange = -2;
|
||||
_cost = 2;
|
||||
_range = 0;
|
||||
_usesMax = 1;
|
||||
@@ -18,14 +17,14 @@ public partial class Shortsword : PegAction
|
||||
|
||||
public override Tween CreateAnimation(Peg PEG)
|
||||
{
|
||||
Vector2 target = PEG._disposition * Vector2.Up * PEG._pegController._playArea._map._cellSize;
|
||||
GD.Print(target);
|
||||
Vector2 target = PEG._disposition * Vector2.Down * PEG._pegController._playArea._map._cellSize;
|
||||
// GD.Print(target);
|
||||
Tween subtween = CreateTween();
|
||||
subtween.TweenProperty(_image, "visible", true, 0.0f);
|
||||
subtween.TweenProperty(_image, "position", target, 0.5f);
|
||||
subtween.TweenCallback(Callable.From(() =>
|
||||
{
|
||||
PEG._pegController._playerController.ChangeHealth(_healthChange, this);
|
||||
PEG._pegController._playerController.ChangeHealth(-2, this);
|
||||
_image.Position = Vector2.Zero;
|
||||
_image.Visible = false;
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user