mergemilitary/Assets/Scripts/UIs/CustomControl/LevelSpot.cs

21 lines
515 B
C#
Raw Permalink Normal View History

2022-05-23 13:39:59 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
public class LevelSpot : MonoBehaviour
{
[SerializeField] GameObject mGobPassed;
[SerializeField] GameObject mGobCurrent;
public void InitSpot(bool pPassed, bool pCurrent)
{
mGobPassed.SetActive(pPassed);
mGobCurrent.SetActive(pCurrent);
if (pCurrent)
{
transform.DOScale(1.2f, 0.5f).SetEase(Ease.Linear).SetLoops(-1, LoopType.Yoyo);
}
}
}