Created
February 13, 2020 23:46
-
-
Save Lkledu/e17e4f70bc9ded1e9238d7bb7bb7d19f to your computer and use it in GitHub Desktop.
FadeIn screen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class fadeIn : MonoBehaviour | |
{ | |
Image img; | |
//m_Group.alpha = (Mathf.Sin(Time.time * m_SmoothTime)+ 1.0f) * 0.5f; | |
void Start() | |
{ | |
img = GetComponent<Image>(); | |
img.color = Color.black; | |
} | |
void Update() | |
{ | |
img.color = Color.Lerp(Color.black, Color.white, Time.time * 0.5f); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment