Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         if (GUI_Dialog.GetActiveStackAmount() > 0)
         {
             bunyi_click();
             GUI_Dialog.ReleaseTopCanvas();
         }
         else
         {
             GUI_Dialog.InsertStack(sc_mainmenu_canvas_handler.Instance().cvQuit.gameObject);
         }
     }
 }
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyUp(KeyCode.Escape))
        {
            //isKeyDown = true;

            SoundManager.instance.PlayButton();

            if (GUI_Dialog.GetActiveStackAmount() > 0)
            {
                GUI_Dialog.ReleaseTopCanvas();
            }
            else
            {
                /*
                 * if (canvasQuit.gameObject.activeSelf)
                 * {
                 *      canvasQuit.gameObject.SetActive(false);
                 *      canvasQuit.gameObject.SetActive(false);
                 * }
                 * else
                 * {
                 *      canvasQuit.gameObject.SetActive(true);
                 *      canvasQuit.gameObject.SetActive(true);
                 * }*/
                GUI_Dialog.InsertStack(canvasQuit.gameObject);
            }
        }
        //else if (Input.GetKeyUp(KeyCode.Escape))
        //{
        //	isKeyDown = false;
        //}

        if (isUsingAssetBundle)
        {
            if (AssetBundleManager.GetInstance().IsDownloading() && AssetBundleManager.GetInstance().getWWW() != null && AssetBundleManager.GetInstance().getWWW().isDone == false)
            {
                if (scrollbarABDownload != null && AssetBundleManager.GetInstance().getWWW().progress > 0.01f)
                {
                    scrollbarABDownload.gameObject.SetActive(true);
                    //scrollbarABDownload.value = 0.5f;
                    //Debug.LogError(AssetBundleManager.progress);
                    labelPercentage.text      = ((int)(AssetBundleManager.GetInstance().getWWW().progress *100)).ToString() + "%";
                    scrollbarABDownload.value = AssetBundleManager.GetInstance().getWWW().progress;
                }
            }
        }
    }