void Start()
    {
        //background[Random.Range(0, 4)].SetActive(true);

        if (AsyLoadScene.sceneName == "MainCity")
        {
            background[5].SetActive(true);
        }
        else if (AsyLoadScene.sceneName == "MainMenu")
        {
            background[4].SetActive(true);
        }
        else
        {
            int index = PlayerData.CurrentLevelIndex % 4;
            if (index == -1)
            {
                background[0].SetActive(true);
            }
            else
            {
                background[index].SetActive(true);
            }
        }

        AsyLoadScene.LoadScene();
    }
Esempio n. 2
0
    //开始游戏
    public void StartGame()
    {
        if (PlayerData.CharacterName == "")
        {
            return;
        }

        follow.SetTarget(point1);
        load.SetActive(true);
        load.GetComponent <DOTweenAnimation>().DOPlayForward();
        choose.GetComponent <DOTweenAnimation>().DOPlayBackwards();
        AsyLoadScene.sceneName = "MainCity";
        AsyLoadScene.LoadScene();
        isLoad = true;
        tutorial.SetActive(false);
    }