25 lines
581 B
C#
25 lines
581 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
[RequireComponent(typeof(CanvasGroup))]
|
|
public class TutorialController : MonoBehaviour {
|
|
private CanvasGroup Canvas;
|
|
|
|
private void Awake() {
|
|
Canvas = GetComponent<CanvasGroup>();
|
|
}
|
|
|
|
private void Start() {
|
|
Canvas.alpha = 0;
|
|
}
|
|
|
|
private void Update() {
|
|
if (Time.time < 5) {
|
|
Canvas.alpha = Mathf.Lerp(Canvas.alpha, 1, Time.time - 2);
|
|
} else {
|
|
Canvas.alpha = Mathf.Lerp(Canvas.alpha, 0, Time.time - 15);
|
|
}
|
|
}
|
|
}
|