Boss Animation

This commit is contained in:
MaddoScientisto 2025-03-06 22:09:11 +01:00
commit 08cc298a81
9 changed files with 139 additions and 13 deletions

View file

@ -21,11 +21,16 @@ public partial class SimpleMovementPattern : AttackPattern
isComplete = false;
Vector2 targetPosition = (Boss?.HomePosition ?? boss.GlobalPosition) + relativeTargetPosition;
boss.ChangeSpriteDirection(-(boss.GlobalPosition - targetPosition));
tween.TweenProperty(Boss, "global_position", targetPosition, moveDuration)
.SetTrans(transitionType)
.SetEase(easeType)
.Finished += () => isComplete = true;
.Finished += () =>
{
isComplete = true;
boss.ChangeSpriteDirection(Vector2.Zero);
};
}
public override void UpdatePattern(double delta) { }