added a parry button and animation that lets player chose their enemy hit behaviour
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 22s
Create tag and build when new code gets to main / Test (push) Successful in 5m57s
Create tag and build when new code gets to main / Export (push) Successful in 7m43s

This commit is contained in:
2026-01-30 13:19:28 +01:00
parent cc973b9f0d
commit 3525f0e3eb
9 changed files with 488 additions and 52 deletions

View File

@@ -12,19 +12,16 @@ public partial class PlayerUi : Control
public enum TargetState
{
NoTarget,
TargetTooFar,
TargetInRange,
TargetDashThrough
TargetWouldNotKill,
TargetWouldKill
}
public record TargetProperties(TargetState State, Vector2 Position);
[Export]
public Color DashThroughColor { get; set; } = new Color("009c8f");
public Color WouldKillColor { get; set; } = new Color("009c8f");
[Export]
public Color DashBlockedColor { get; set; } = new Color("fc001c");
[Export]
public Color DashOutOfRangeColor { get; set; } = new Color("ffffff");
public Color WouldNotKillColor { get; set; } = new Color("fc001c");
public override void _Ready()
{
@@ -49,10 +46,9 @@ public partial class PlayerUi : Control
var modulation = state switch
{
TargetState.TargetTooFar => DashOutOfRangeColor,
TargetState.TargetInRange => DashBlockedColor,
TargetState.TargetDashThrough => DashThroughColor,
_ => DashOutOfRangeColor
TargetState.TargetWouldNotKill => WouldNotKillColor,
TargetState.TargetWouldKill => WouldKillColor,
_ => WouldNotKillColor
};
_enemyTarget.SetVisible(visible);
_enemyTarget.SetPosition(position - _enemyTarget.Size / 2);