33 lines
936 B
C#
33 lines
936 B
C#
|
|
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();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|