FInalize first pass over cement decoration game

This commit is contained in:
Michal Pikulski
2025-11-24 15:54:03 +01:00
parent e04db31a98
commit b90ab4b0ba
32 changed files with 954 additions and 570 deletions

View File

@@ -145,6 +145,26 @@ namespace Minigames.StatueDressup.Utils
return Tween.CanvasGroupAlpha(canvasGroup, targetAlpha, duration, 0f, Tween.EaseInOut, completeCallback: onComplete);
}
/// <summary>
/// Pop-out with fade - scale to 0 and fade out simultaneously
/// </summary>
public static void PopOutWithFade(Transform transform, CanvasGroup canvasGroup, float duration, Action onComplete = null)
{
// Scale to 0
Tween.LocalScale(transform, Vector3.zero, duration, 0f, Tween.EaseInBack);
// Fade out simultaneously
if (canvasGroup != null)
{
Tween.CanvasGroupAlpha(canvasGroup, 0f, duration, 0f, Tween.EaseInOut, completeCallback: onComplete);
}
else
{
// If no canvas group, just call complete after scale
Tween.LocalScale(transform, Vector3.zero, duration, 0f, Tween.EaseInBack, completeCallback: onComplete);
}
}
#endregion
}
}