void clickStartBt(int key) { if (!bIsClickStartBt) { return; } if (bIsSelectLeve) { return; } bIsClickStartBt = false; bIsSelectLeve = true; IsCanActiveSetPanel = false; //reset IsSelectGameMode StartSenceChangeUI.IsSelectGameMode = false; if ((Starts.activeSelf && key == 0) || key == 1) { Starts.SetActive(false); if (GlobalData.GetInstance().LinkModeState != 0 && !GlobalData.GetInstance().IsFreeMode) { Toubi.GetInstance().subPlayerCoin(); } pcvr.StartLightStateP1 = LedState.Mie; if (GlobalData.GetInstance().gameMode == GameMode.OnlineMode) { LinkPlayerNameCtrl.GetInstance().HiddenPlayerInfo(); if (key == 0) { NetCtrlScript.handleSelectLevel((int)GlobalData.GetInstance().gameLeve); } else { SelectObj.SetActive(false); GlobalData.GetInstance().gameLeve = NetCtrlScript.GetSelectGameLevel(); NetCtrlScript.handleResetLinkCount(); //ScreenLog.Log("********** level " + GlobalData.GetInstance().gameLeve); } } if (GlobalData.GetInstance().gameMode == GameMode.OnlineMode && key == 0) { NetCtrlScript.handleLoadLevel(); } if (GlobalData.GetInstance().gameLeve == GameLeve.Leve1) { Leve2.SetActive(false); StopAllCoroutines(); Leve1.GetComponent <TweenPosition>().enabled = false; Leve1Hover.enabled = false; Leve1Unhover.enabled = false; //Leve1UI.spriteName="diYiGuanDaTu"; //Leve1UITexture.mainTexture = Leve1Texture[2]; Leve1.transform.position = Vector3.zero; Leve1.transform.eulerAngles = Vector3.zero; TweenScale scale = Leve1.GetComponent <TweenScale>(); scale.PlayForward(); EventDelegate.Add(scale.onFinished, delegate { //AudioManager.Instance.PlayBGM(BackgroundAudio,true); AudioSourceObj = AudioManager.Instance.audio; AudioSourceObj.clip = BackgroundAudio; AudioSourceObj.loop = true; AudioSourceObj.Play(); InvokeRepeating("changeBackgroundSdVol", 0f, 1.5f); StartCoroutine("ColorCorrection"); }); } else if (GlobalData.GetInstance().gameLeve == GameLeve.Leve2) { Leve1.SetActive(false); StopAllCoroutines(); Leve2.GetComponent <TweenPosition>().enabled = false; Leve2Hover.enabled = false; Leve2UnHover.enabled = false; //Leve2UITexture.mainTexture = Leve2Texture[2]; //Leve2UI.spriteName="diErGuanDaTu"; Leve2.transform.position = Vector3.zero; Leve2.transform.eulerAngles = Vector3.zero; TweenScale scale = Leve2.GetComponent <TweenScale>(); scale.PlayForward(); EventDelegate.Add(scale.onFinished, delegate { AudioSourceObj = AudioManager.Instance.audio; AudioSourceObj.clip = BackgroundAudio; AudioSourceObj.loop = true; AudioSourceObj.Play(); InvokeRepeating("changeBackgroundSdVol", 0f, 1.5f); StartCoroutine("ColorCorrection"); }); } } }