예제 #1
0
    //    void Start()
    //    {
    //#if UNITY_EDITOR
    //        var backButtonPrefab = Resources.Load<GameObject>("BackButton");
    //        var backButton = Instantiate(backButtonPrefab, transform);
    //        if (backButton == null)
    //            Debug.LogError("Failed to load BackButton!");
    //        backButton.transform.SetParent(transform);
    //        backButton.GetComponent<Button>().onClick.AddListener(() => { SceneTranlater.LoadSceneByCount(0); });
    //#endif
    //    }
#if UNITY_EDITOR || UNITY_STANDALONE_WIN
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.B))
        {
            SceneTranlater.LoadSceneByCount(0);
        }
    }
예제 #2
0
    public void NextStage()
    {
        int index = SceneTranlater.GetCurrentBuildIndex();

        if (index < 4)
        {
            SceneManager.LoadScene(index + 1);
        }
    }
예제 #3
0
    private void Start()
    {
        int index = SceneTranlater.GetCurrentBuildIndex();


        objs[Mathf.Clamp(index - 2, 0, objs.Count - 1)].SetActive(true);

        if (index == (int)SceneIndex.THIRD)
        {
            StartCoroutine(BecomeLarger());  //第三关UI变大
        }
        m_rankImage.sprite = m_rankSprites[ScoreManager.Instance.GetRank()];
    }