36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using DG.Tweening;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Continentis.MainGame.UI
|
|
{
|
|
public class HUD_SelectingDot : HUDElementBase
|
|
{
|
|
public Image dot;
|
|
public Image outCircle;
|
|
private Sequence circleAnimation;
|
|
|
|
public override void OnEnableHud()
|
|
{
|
|
dot.gameObject.SetActive(true);
|
|
|
|
outCircle.gameObject.SetActive(true);
|
|
outCircle.color = Color.white;
|
|
outCircle.rectTransform.localScale = Vector3.zero;
|
|
|
|
circleAnimation = DOTween.Sequence();
|
|
circleAnimation.Append(outCircle.rectTransform.DOScale(1f, 1f).SetEase(Ease.OutQuad));
|
|
circleAnimation.Append(outCircle.DOFade(0f, 0.5f).SetEase(Ease.OutQuad));
|
|
circleAnimation.SetLoops(-1, LoopType.Restart);
|
|
circleAnimation.Play();
|
|
}
|
|
|
|
public override void OnDisableHud()
|
|
{
|
|
dot.gameObject.SetActive(false);
|
|
|
|
outCircle.gameObject.SetActive(false);
|
|
circleAnimation.Kill();
|
|
}
|
|
}
|
|
} |