Files
ichni_Official/Assets/Scripts/UI/StartPage/StartPageLogo.cs

33 lines
936 B
C#
Raw Normal View History

2025-07-08 14:28:40 -04:00
using System;
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using UnityEngine;
using UnityEngine.UI;
namespace Ichni.Menu.UI
{
public class StartPageLogo : MonoBehaviour
{
public Image logoFrame;
public Tweener logoFrameExpand;
public float edgeValue;
private void Start()
{
edgeValue = 0;
logoFrame.material = Instantiate(logoFrame.material);
logoFrameExpand = DOTween.To(() => edgeValue, x => edgeValue = x, 1f, 4f)
.OnUpdate(() =>
{
logoFrame.material.SetFloat("_EdgeValue", edgeValue);
logoFrame.material.SetFloat("_Opacity", 1 - edgeValue);
})
.SetDelay(2f)
.SetEase(Ease.OutQuad)
.SetLoops(-1, LoopType.Restart);
logoFrameExpand.Play();
}
}
}