Refactor FlipComponent to use PlayerController and remove ProgressiveDamageComponent from scene

This commit is contained in:
2025-08-31 02:11:05 +02:00
parent 604520cad5
commit 51aecf7da5
4 changed files with 6 additions and 78 deletions

View File

@@ -6,13 +6,13 @@ public partial class FlipComponent : Node2D
{
[Export] public Sprite2D LeftEye { get; set; }
[Export] public Sprite2D RightEye { get; set; }
[Export] public PlatformMovementComponent PlatformMovement { get; set; }
[Export] public PlayerController PlayerController { get; set; }
public override void _Process(double delta)
{
if (PlatformMovement == null) return;
if (PlayerController == null) return;
var velocity = PlatformMovement.LastDirection;
var velocity = PlayerController.LastDirection;
switch (velocity.X)
{
case < 0f: