//表演後 private void DoAfterPerformance2(Pfm2CallBackFunc callBackFunc = null) { _pfm2CallBackFunc = null; _pfm2CallBackFunc = callBackFunc; Debug.Log("DoAfterPerformance2"); if(_pfm2CallBackFunc != null) { _pfm2CallBackFunc(); } }
//表演 private IEnumerator DoPerformance2(Pfm2CallBackFunc callBackFunc = null) { _pfm2CallBackFunc = null; _pfm2CallBackFunc = callBackFunc; yield return new WaitForSeconds(1.0f); _bannerTweenControl.PlayMoveAni();//贏家出現 NGUITools.PlaySound(winnerSound);//播放音效 yield return new WaitForSeconds(2.0f); _btn_Menu.SetActive(true);//回Menu鈕出現 if(_pfm2CallBackFunc != null) { _pfm2CallBackFunc(); } }
// 表演前 private void DoBeforePerformance2(Pfm2CallBackFunc callBackFunc = null) { _pfm2CallBackFunc = null; _pfm2CallBackFunc = callBackFunc; int lavaID = _rankData[1].lavaNum; SettingWinnerCaterpillar(lavaID);//設定贏家頭像 //計算參加人數 int joinNum = 0; foreach (bool isJoin in isJoinGame) { if(isJoin)joinNum++; } for (int rankTag = 0; rankTag < joinNum; rankTag++) { int rank = rankTag+1;//名次 lavaID = _rankData[rank].lavaNum;//蟲蟲編號 byte posId = lavaPos[lavaID-1];//圖像位置 _caterpillarIconAni[posId].enabled = false;//關掉頭像動畫 if(rank == 1)//第一名隱藏 { _caterpillarIconAni[posId].gameObject.GetComponent<UISprite>().enabled = false; _caterpillarBody[posId].gameObject.GetComponent<UISprite>().enabled = false; } else//其餘驚訝貌 { string spriteName = string.Format("Png_ScorePart2_Caterpillar0{0}_00",lavaID); _caterpillarIconAni[posId].gameObject.GetComponent<UISprite>().spriteName = spriteName; } } if(_pfm2CallBackFunc != null) { _pfm2CallBackFunc(); } }