TestLogo.cs 659 B

12345678910111213141516171819202122232425262728293031
  1. using DG.Tweening;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. using UnityEngine.UI;
  6. public class TestLogo : MonoBehaviour
  7. {
  8. public Material background;
  9. public Image logo;
  10. public GameObject map;
  11. public float times;
  12. void Start()
  13. {
  14. // AudioListener.volume = 0;
  15. Invoke("Gradient", 3f);
  16. }
  17. void Gradient()
  18. {
  19. // AudioListener.volume = 1;
  20. logo.DOColor(new Color(logo.color.r, logo.color.g, logo.color.b, 0), times);
  21. background.DOColor(new Color(logo.color.r, logo.color.g, logo.color.b, 0), times);
  22. map.SetActive(true);
  23. }
  24. }