protected override void OnDlgInit() { BoxOK.size = new Vector3(0, 0, 0); SprOKBtn.spriteName = "GrayButton"; SprOKText.color = new Color(0.66f, 0.66f, 0.66f); cTempChar[0] = GameObject.Find("GameObj_Man"); cTempChar[1] = GameObject.Find("GameObj_Woman"); cManObj = DcGlobalFunc.CreateChar(CharSex.eMan, CharModel.eOne, CharForWhat.eCreateCharacter, true); cManObj.transform.parent = cTempChar[0].transform; cManObj.transform.localPosition = new Vector3(0f, 0f, 0f); cManObj.transform.Rotate(new Vector3(0, 180f, 0)); cWomanObj = DcGlobalFunc.CreateChar(CharSex.eWoman, CharModel.eOne, CharForWhat.eCreateCharacter, true); cWomanObj.transform.parent = cTempChar[1].transform; cWomanObj.transform.localPosition = new Vector3(0f, 0f, 0f); }
private void SelRoom(object sender) { GameObject obj = sender as GameObject; char[] splt = { '_' }; string lastnum = DcGlobalFunc.GetLastString(obj.transform.parent.name, splt); int nSelRoom = Convert.ToInt32(lastnum) - 1; //Debug.LogError(lastnum); SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager; mgr.cShareData.cCurRoomData = mgr.cShareData.lstRoomsData[nSelRoom]; mgr.cShareData.cCurSongData = mgr.cShareData.lstSongData[mgr.cShareData.lstRoomsData[nSelRoom].nSongID]; mgr.cShareData.strDiffLv = mgr.cShareData.lstRoomsData[nSelRoom].strDiff; mgr.cShareData.strMode = mgr.cShareData.strDancingMode[nCurModeIdx]; mgr.cShareData.cCurSongData.nWhereScene = 0; GotoWaitingRoom(); }
protected override void OnDlgInit() { SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager; for (int i = 0; i < cItems.Length; i++) { cItems[i].SetActiveRecursively(false); } for (int i = 0; i < 5 /*mgr.cShareData.lstFriendsData.Count*/; i++) { cItems[i].SetActiveRecursively(true); for (int j = 0; j < cItems[i].transform.childCount; j++) { GameObject child = cItems[i].transform.GetChild(j).gameObject; if (child.name == "sprItemBg_0") { SprItemBg[i * 2] = child.GetComponent(typeof(UISprite)) as UISprite; } else if (child.name == "sprItemBg_1") { SprItemBg[i * 2 + 1] = child.GetComponent(typeof(UISprite)) as UISprite; } else if (child.name == "sprItemIcon_0") { SprItemIcon[i * 2] = child.GetComponent(typeof(UISprite)) as UISprite; SprItemIcon[i * 2].spriteName = "Head portrait girl 01"; } else if (child.name == "sprItemIcon_1") { SprItemIcon[i * 2 + 1] = child.GetComponent(typeof(UISprite)) as UISprite; SprItemIcon[i * 2 + 1].spriteName = "Head portrait girl 03"; } } } TempInitClothesAndPantsIcon(0); TempInitClothesAndPantsIcon(5); DcGlobalFunc.CreateChar(mgr.cShareData.eUserSex, CharModel.eOne, CharForWhat.eChest, true); }
void ShowTimeStart() { cShowTime.SetActiveRecursively(true); cShowTime.animation.Play(); nComboNum4Result += nComboNum; nComboNum = 0; ShowCombo(); bIsInShowTime = true; nShowTimeCnt = 0; fBeatTime *= 2f; DcGlobalFunc.SetPEEmitState(PEType.eBubbles, true); cCamAnim.Stop(); cCamAnim.CrossFade("Cam_1"); NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController; soundctr.PlaySe("v_show_time"); }
void Start() { SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager; GameObject cCharObj = DcGlobalFunc.CreateChar(mgr.cShareData.eUserSex, CharModel.eOne, CharForWhat.eDancingMain, false); cMainChar = cCharObj.GetComponent(typeof(DcCharAnim)) as DcCharAnim; if (mgr.cShareData.nDancingEntranceType == 2) { if (mgr.cShareData.cCurRoomData.litPeopleSex.Count >= 1) { cCharObj = DcGlobalFunc.CreateChar(mgr.cShareData.cCurRoomData.litPeopleSex[0] == 0 ? CharSex.eMan : CharSex.eWoman, mgr.cShareData.cCurRoomData.litPeopleSex[0] == 0 ? CharModel.eOne : CharModel.eTwo, CharForWhat.eDancingLeft, false, false); } } else { cCharObj = DcGlobalFunc.CreateChar(mgr.cShareData.eUserSex == CharSex.eMan ? CharSex.eWoman : CharSex.eMan, CharModel.eOne, CharForWhat.eDancingLeft, false, false); } cCostar[0] = cCharObj.GetComponent(typeof(DcCharAnim)) as DcCharAnim; if (mgr.cShareData.nDancingEntranceType == 2) { if (mgr.cShareData.cCurRoomData.litPeopleSex.Count >= 2) { cCharObj = DcGlobalFunc.CreateChar(mgr.cShareData.cCurRoomData.litPeopleSex[1] == 0 ? CharSex.eMan : CharSex.eWoman, mgr.cShareData.cCurRoomData.litPeopleSex[1] == 0 ? CharModel.eOne : CharModel.eTwo, CharForWhat.eDancingRight, false, false); } } else { cCharObj = DcGlobalFunc.CreateChar(CharSex.eWoman, CharModel.eTwo, CharForWhat.eDancingRight, false, false); } cCostar[1] = cCharObj.GetComponent(typeof(DcCharAnim)) as DcCharAnim; posCurMainCharPos = cMainChar.transform.localPosition; }
protected override void OnDlgInit() { if (bIsRelease) { cLocalization = Singlton.getInstance("NvLocalizationManager") as NvLocalizationManager; if (cLocalization == null) { Debug.LogError("Can Not Find Localization File!!"); } } NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController; soundctr.PlayBgMusic("music_result"); cBasicNumber.Init(ref SprBasicNumber, eNumberType.eSilver); cComboNumber.Init(ref SprComboNumber, eNumberType.eSilver); PanBgShake.animation.Stop(); SprWin.animation.Stop(); SprLost.animation.Stop(); SprBlackLine.animation.Stop(); SprWin.enabled = false; SprLost.enabled = false; SprBlackLine.enabled = false; for (int i = 0; i < SprBasicNumber.Length; i++) { SprBasicNumber[i].animation.Stop(); SprComboNumber[i].animation.Stop(); } for (int i = 0; i < cWinFlicker.Length; i++) { cWinFlicker[i].SetActiveRecursively(false); } DcGlobalFunc.SetPEEmitState(PEType.eWinFireworks, false); StartCoroutine(ShowScore(1)); }
private void ShowMessagePanel(object sender) { PanMessage.gameObject.SetActiveRecursively(true); GameObject obj = sender as GameObject; char[] splt = { '_' }; string lastnum = DcGlobalFunc.GetLastString(obj.transform.parent.name, splt); int nSelFriend = Convert.ToInt32(lastnum) - 1; SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager; mgr.cShareData.cCurFriendData = mgr.cShareData.lstFriendsData[nSelFriend]; SprMsgFriendIcon.spriteName = SprIcon[nSelFriend].spriteName; LabMsgFriendName.text = mgr.cShareData.cCurFriendData.strFriendName; LabMsgFriendLv.text = mgr.cShareData.cCurFriendData.nFriendLv.ToString(); NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController; soundctr.PlaySe("ui_touch"); }
private void SelChallengeIndex(object sender) { GameObject obj = sender as GameObject; char[] splt = { '_' }; string lastnum = DcGlobalFunc.GetLastString(obj.transform.name, splt); nCurSelChallengeIndex = Convert.ToInt32(lastnum) - 1; //Debug.Log("SelChallengeIndex:" + nCurSelChallengeIndex); if (nCurSelChallengeIndex != nLastCSCIdx) { SetChallengeChallenge(); nLastCSCIdx = nCurSelChallengeIndex; for (int i = 0; i < SprSongSelHalo.Length; i++) { SprSongSelHalo[i].enabled = (nCurSelChallengeIndex == i ? true : false); } NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController; soundctr.PlaySe("ui_check"); } }
protected override void OnDlgInit() { SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager; DcGlobalFunc.CreateChar(mgr.cShareData.eUserSex, CharModel.eOne, CharForWhat.eInterior, true); }
IEnumerator ChangeFireworksPosition(float timevalue) { yield return(new WaitForSeconds(timevalue)); DcGlobalFunc.ChangePEPosition(PEType.eFireworks); }
//保存当前编辑的歌曲信息 private void SaveCueEditSongInfo() { SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager; DcGlobalFunc.SaveJson(mgr.cShareData.lstSongData, "Assets/Resources/TXT/Table/Song.txt"); }
IEnumerator StopWinFireworks(float timevalue) { yield return(new WaitForSeconds(timevalue)); DcGlobalFunc.SetPEEmitState(PEType.eWinFireworks, false); }
IEnumerator ShowScore(float timevalue) { yield return(new WaitForSeconds(timevalue)); SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager; cBasicNumber.ShowNumber(ref SprBasicNumber, bIsRelease ? mgr.cShareData.nBasicScore : 12345); int nDigit = cComboNumber.ShowNumber(ref SprComboNumber, bIsRelease ? mgr.cShareData.nComboScore : 67890); for (int i = 0; i < SprBasicNumber.Length; i++) { SprBasicNumber[i].animation.Play(); SprComboNumber[i].enabled = false; } StartCoroutine(DelayPlayComboNumberAnim(nDigit, 0.8f)); if (bIsRelease ? mgr.cShareData.bIsWin : true) { SprWin.enabled = true; SprWin.animation.Play(); if (bIsRelease) { if (mgr.cShareData.bIsChallengeOthers) { if (mgr.cShareData.nBasicScore > mgr.cShareData.nHighScores) { LabOwnership.text = cLocalization.GetValue("GetOwnership"); mgr.cShareData.lstBuildingData[mgr.cShareData.nCurSelBuildingIdx].litSongMaster[mgr.cShareData.nCurSelSongIdx4Building] = mgr.cShareData.strUserName; mgr.cShareData.lstBuildingData[mgr.cShareData.nCurSelBuildingIdx].litHighScores[mgr.cShareData.nCurSelSongIdx4Building] = mgr.cShareData.nBasicScore; DcGlobalFunc.SaveJson(mgr.cShareData.lstBuildingData, "Assets/Resources/TXT/Table/Building.txt"); } else { LabOwnership.text = cLocalization.GetValue("ChallengeFail"); } } else { if (mgr.cShareData.nBasicScore > mgr.cShareData.nHighScores) { LabOwnership.text = cLocalization.GetValue("NewHighScores"); mgr.cShareData.lstBuildingData[mgr.cShareData.nCurSelBuildingIdx].litHighScores[mgr.cShareData.nCurSelSongIdx4Building] = mgr.cShareData.nBasicScore; DcGlobalFunc.SaveJson(mgr.cShareData.lstBuildingData, "Assets/Resources/TXT/Table/Building.txt"); } else { LabOwnership.text = cLocalization.GetValue("NoSurpass"); } } } } else { SprLost.enabled = true; SprLost.animation.Play(); PanBgShake.animation.CrossFade("ShopBgColorChange"); if (bIsRelease) { LabOwnership.text = cLocalization.GetValue("IsSubstandard"); } } }
protected override void OnDlgInit() { SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager; DcGlobalFunc.CreateChar(mgr.cShareData.eUserSex, CharModel.eOne, CharForWhat.eChest, true); cMoneyNumber.Init(ref SprMoneyNumber, eNumberType.eSilver); cExpNumber.Init(ref SprExpNumber); //test cMoneyNumber.ShowNumber(ref SprMoneyNumber, 12345); cExpNumber.ShowNumber(ref SprExpNumber, 67890); for (int i = 0; i < cGoods.Length; i++) { cGoods[i].SetActiveRecursively(false); } for (int i = 0; i < 8 /*mgr.cShareData.lstFriendsData.Count*/; i++) { cGoods[i].SetActiveRecursively(true); for (int j = 0; j < cGoods[i].transform.childCount; j++) { GameObject child = cGoods[i].transform.GetChild(j).gameObject; if (child.name == "sprItemBg_0") { SprGoods[i * 2] = child.GetComponent(typeof(UISprite)) as UISprite; } else if (child.name == "sprItemBg_1") { SprGoods[i * 2 + 1] = child.GetComponent(typeof(UISprite)) as UISprite; } if (child.name == "btnBuy_0") { SprGoodsBuyBtn[i * 2] = child.GetComponent(typeof(UISprite)) as UISprite; } else if (child.name == "btnBuy_1") { SprGoodsBuyBtn[i * 2 + 1] = child.GetComponent(typeof(UISprite)) as UISprite; } if (child.name == "sprBuy_0") { SprGoodsBuyText[i * 2] = child.GetComponent(typeof(UISprite)) as UISprite; } else if (child.name == "sprBuy_1") { SprGoodsBuyText[i * 2 + 1] = child.GetComponent(typeof(UISprite)) as UISprite; } if (child.name == "sprItemIcon_0") { SprGoodsIcon[i * 2] = child.GetComponent(typeof(UISprite)) as UISprite; } else if (child.name == "sprItemIcon_1") { SprGoodsIcon[i * 2 + 1] = child.GetComponent(typeof(UISprite)) as UISprite; } if (child.name == "labItemPrice_0") { LabGoodsPrice[i * 2] = child.GetComponent(typeof(UILabel)) as UILabel; LabGoodsPrice[i * 2].text = (i * 2).ToString(); } else if (child.name == "labItemPrice_1") { LabGoodsPrice[i * 2 + 1] = child.GetComponent(typeof(UILabel)) as UILabel; LabGoodsPrice[i * 2 + 1].text = (i * 2 + 1).ToString(); } } } }