4.Title/StageSelect

개발 일지/Move Cube 2020. 8. 17. 15:45

1.Title

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
 
public class SceneLogo : MonoBehaviour
{
    public Image imgLogo;
 
    public void Init(string name = ""int prefabId = 0)
    {
        StartCoroutine(this.FadeInOut());
    }
 
    public IEnumerator FadeInOut()
    {
        var color = this.imgLogo.color;
        float alpha = color.a;
        while (true)
        {
            alpha += 0.016f;
            color.a = alpha;
            this.imgLogo.color = color;
 
            if (alpha >= 1)
            {
                alpha = 1;
                break;
            }
            yield return null;
        }
 
        yield return new WaitForSeconds(1.5f);
 
        while (true)
        {
            alpha -= 0.016f;
            color.a = alpha;
            this.imgLogo.color = color;
 
            if (alpha <= 0)
            {
                alpha = 0;
                break;
            }
            yield return null;
        }
 
        GameSceneManager.GetInstance().LoadScene(3);
    }
}
 
cs




'개발 일지 > Move Cube' 카테고리의 다른 글

6.Google Play Beta.ver//구글 플레이 베타버전 업로드  (0) 2020.08.17
5.Stage, Cube, CubeMove  (0) 2020.08.17
3.App -> Logo  (0) 2020.08.17
2.Unity Info관리  (0) 2020.08.17
1.Unity GameSceneManager  (0) 2020.08.17
: