private void DrumBeat()
    {
        //Debug.Log("DrumBeat");

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        if (bIsCanPressDrum)
        {
            if (posSliderPos.x >= 85 && posSliderPos.x <= 95)
            {
                Debug.LogWarning("Perfect:" + posSliderPos.x);
                soundctr.PlaySe("perfect");
                nCurScore += bIsInShowTime ? nScoreStandard[0] * 2 : nScoreStandard[0];
                cNumber.ShowNumber(ref SprNumber, nCurScore);
                nPerfectNum++;
                GoodUp(true);
            }
            else if (posSliderPos.x >= 70 && posSliderPos.x <= 110)
            {
                Debug.LogWarning("Good:" + posSliderPos.x);
                soundctr.PlaySe("good");
                nCurScore += bIsInShowTime ? nScoreStandard[1] * 2 : nScoreStandard[1];
                cNumber.ShowNumber(ref SprNumber, nCurScore);
                GoodUp(false);
            }
            else if (posSliderPos.x >= 65 && posSliderPos.x <= 115)
            {
                Debug.LogWarning("Bad:" + posSliderPos.x);
                soundctr.PlaySe("bad");
                nCurScore += bIsInShowTime ? nScoreStandard[2] * 2 : nScoreStandard[2];
                cNumber.ShowNumber(ref SprNumber, nCurScore);
                SprBad.animation.Play();
                SprBad.enabled    = true;
                bIsSucceedDancing = false;
                nSuccessionSD     = 0;
                cCharMgr.MainCharIdleForDancing();
                bIsLastGoodUp = true;
            }
            else
            {
                soundctr.PlaySe("miss");
                Miss();
            }

            bIsCanPressDrum = false;

            if (nComboNum >= ComboCnt4ShowTime)
            {
                SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;
                if (mgr.cShareData.lstBeatData[cCurSongData.litBeatDataIdx].litOpeData.Count > nCurOpeDataIdx + ShowTimeTurns * 2)
                {
                    ShowTimeStart();
                }
            }
        }
    }
    private void ReturnMap()
    {
        //Debug.Log("ReturnMap");

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");

        cGesture.SetGestureEnable(false);

        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        if (mgr.cShareData.nDancingEntranceType == 0)
        {
            mgr.ChangeScene("UI_Map");
        }
        else if (mgr.cShareData.nDancingEntranceType == 1)
        {
            mgr.ChangeScene("UI_MyHome_Interior");
        }
        else if (mgr.cShareData.nDancingEntranceType == 2)
        {
            mgr.ChangeScene("UI_WaitingRoom");
        }
    }
Exemple #3
0
    //单击歌曲列表中某首歌时的事件响应
    private void SelSong(object sender)
    {
        if (objLastSelSongBtnSender == sender)
        {
            return;
        }
        objLastSelSongBtnSender = sender;

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");

        GameObject obj = sender as GameObject;

        char[] splt    = { '_' };
        string lastnum = DcGlobalFunc.GetLastString(obj.transform.name, splt);
        //Debug.Log("1111111111" + lastnum);
        int nSelSong = Convert.ToInt32(lastnum) - 1;

        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        for (int i = 0; i < mgr.cShareData.lstSongData.Count; i++)
        {
            SprSongListBg[i].enabled = false;
        }
        SprSongListBg[nSelSong].enabled = true;
        soundctr.PlaySong(mgr.cShareData.lstSongData[nSelSong].strOfficial);
    }
Exemple #4
0
    private void SelSex(bool bIsCheck)
    {
        if (bIsCheck)
        {
            InpUserName.text = "";

            nCurSelSex = ChbSexSel[0].isChecked ? 0 : 1;

            if (bIsFirst)
            {
                bIsFirst = false;
                return;
            }

            if (nCurSelSex == 0)
            {
                cTempChar[0].gameObject.animation.CrossFade("CharToFront");
                cTempChar[1].gameObject.animation.CrossFade("CharToAfter");
            }
            else
            {
                cTempChar[0].gameObject.animation.CrossFade("CharToAfter");
                cTempChar[1].gameObject.animation.CrossFade("CharToFront");
            }

            NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;
            soundctr.PlaySe("ui_check");
        }
    }
    private void OnButtonClick(object sender, object context)
    {
        if ((sender as NvUIButton) == m_btnOk || (sender as NvUIButton) == m_btnOkCentered)
        {
            if (m_style == EMessageBoxStyle.eStyle_OkayCancel || m_style == EMessageBoxStyle.eStyle_OkayOnly)
            {
                //m_result = EResult.eResult_Okay;
                //Debug.Log ("NvMessage Callback: OnOkay");
                endModal((int)EResult.eResult_Okay);
            }
            else if (m_style == EMessageBoxStyle.eStyle_YesNo)
            {
                //Debug.Log ("NvMessage Callback: OnYes");
                endModal((int)EResult.eResult_Yes);
            }
        }
        else if ((sender as NvUIButton) == m_btnCancel)
        {
            if (m_style == EMessageBoxStyle.eStyle_OkayCancel || m_style == EMessageBoxStyle.eStyle_OkayOnly)
            {
                //Debug.Log ("NvMessage Callback: OnCancel");
                endModal((int)EResult.eResult_Cancel);
            }
            else if (m_style == EMessageBoxStyle.eStyle_YesNo)
            {
                //Debug.Log ("NvMessage Callback: OnNo");
                endModal((int)EResult.eResult_No);
            }
        }

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
Exemple #6
0
    private void GotoMap()
    {
        Debug.Log("GotoMap");

        showDialog(false);

        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        if (mgr.cShareData.nDancingEntranceType == 0)
        {
            mgr.ChangeScene("UI_Map");
        }
        else if (mgr.cShareData.nDancingEntranceType == 1)
        {
            mgr.ChangeScene("UI_MyHome_Interior");
        }
        else if (mgr.cShareData.nDancingEntranceType == 2)
        {
            mgr.ChangeScene("UI_WaitingRoom");
        }

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    void SelItem(object sender)
    {
        GameObject obj = sender as GameObject;

        char[] splt    = { '_' };
        string lastnum = DcGlobalFunc.GetLastString(obj.transform.name, splt);

        nSelItem = Convert.ToInt32(lastnum) - 1;
        int nItemIdx = 0;

        if (GetMousePos().y > 357)
        {
            nItemIdx = 0;
        }
        else if (GetMousePos().y < 327)
        {
            nItemIdx = 1;
        }

        nSelItem = nSelItem * 2 + nItemIdx;
        for (int i = 0; i < SprItemBg.Length; i++)
        {
            SprItemBg[i].spriteName = "Item Bg S1";
        }
        SprItemBg[nSelItem].spriteName = "Item Bg S2";

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
Exemple #8
0
    private void SelTask(bool bIsCheck)
    {
        if (bIsCheck)
        {
            for (int i = 0; i < ChbSelTask.Length; i++)
            {
                if (ChbSelTask[i].isChecked)
                {
                    nSelTaskTag = i;
                    ChangeCurShowTask();
                    Debug.LogError("TTTTTTTTTTT:" + nSelTaskTag);
                    break;
                }
            }

            if (bIsFirst)
            {
                bIsFirst = false;
                return;
            }

            NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;
            soundctr.PlaySe("ui_check");
        }
    }
    private void ReturnMap()
    {
        Debug.Log("GotoMap");

        showDialog(false);

        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        if (mgr.cShareData.nShopEntranceType == 0)
        {
            mgr.ChangeScene("UI_Map");
        }
        else if (mgr.cShareData.nShopEntranceType == 1)
        {
            mgr.ChangeScene("UI_MyHome_Outside");
        }
        else if (mgr.cShareData.nShopEntranceType == 2)
        {
            mgr.ChangeScene("UI_MyHome_Interior");
        }
        else if (mgr.cShareData.nShopEntranceType == 3)
        {
            mgr.ChangeScene("UI_MyHome_Chest");
        }
        else if (mgr.cShareData.nShopEntranceType == 4)
        {
            mgr.ChangeScene("UI_MyHome_Dresser");
        }

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    private void HideReturnConfirm()
    {
        PanReturnConfirm.gameObject.SetActiveRecursively(false);

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    private void ShowReturnConfirm(object sender)
    {
        PanReturnConfirm.gameObject.SetActiveRecursively(true);

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    void HaveTake()
    {
        Debug.LogError("HaveTake");

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    void BeFriend()
    {
        Debug.LogError("BeFriend");

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    IEnumerator EndDancing(float timevalue)
    {
        yield return(new WaitForSeconds(timevalue));

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.StopBgmImmediately();

        bIsSucceedDancing = false;
        nSuccessionSD     = 0;
        if (cCharMgr)
        {
            cCharMgr.CosterIdleForDancing();
        }

        if (IsWin())
        {
            if (cCharMgr)
            {
                cCharMgr.MainCharCheer();
            }

            DcGlobalFunc.SetPEEmitState(PEType.eFireworks, true);

            soundctr.PlaySe("music_win");
            StartCoroutine(ChangeFireworksPosition(1.5f));
            StartCoroutine(ChangeFireworksPosition(3));
            StartCoroutine(ChangeFireworksPosition(4.5f));
        }
        else
        {
            if (cCharMgr)
            {
                cCharMgr.ForceMainCharIdleForDancing();
            }
            soundctr.PlaySe("music_lost");
        }

        cGesture.SetGestureEnable(false);

        nComboNum4Result += nComboNum;
        nComboNum         = 0;
        ShowCombo();

        StartCoroutine(ShowResult(5));
    }
    private void HideMessagePanel()
    {
        PanMessage.gameObject.SetActiveRecursively(false);

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    private void ShowFriendHomePanel(object sender)
    {
        //PanFriendHome.gameObject.SetActiveRecursively(true);

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
Exemple #17
0
    private void DiffCancel()
    {
        //Debug.LogError(nAtMiddleIdx);
        ShowDiffSel(false);

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    private void ShowRecordedInPanel()
    {
        PanRecordedIn.gameObject.SetActiveRecursively(true);


        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    private void HideRecordingFinishedPanel()
    {
        PanRecordingFinished.gameObject.SetActiveRecursively(false);
        HideRecordedInPanel();

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    public void GotoSuccess()
    {
        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        mgr.ChangeScene("UI_MyHome_Success");

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    private void GotoDresser()
    {
        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        mgr.ChangeScene("UI_MyHome_Dresser");

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    private void GotoTheLatestSong()
    {
        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        mgr.ChangeScene("UI_TheLatestSong");

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    private void GotoRecordedSongs()
    {
        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        mgr.ChangeScene("UI_RecordedSongs");

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
Exemple #24
0
    private void Prepare()
    {
        SprPrepare[0].enabled = true;
        SprLight[0].enabled   = true;
        BtnPrepare.gameObject.SetActiveRecursively(false);

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    private void ReturnMap()
    {
        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        mgr.ChangeScene("UI_Map");

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    private void GotoDisk()
    {
        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        mgr.ChangeScene("UI_MyHome_Disk");
        mgr.cShareData.nDiskEntranceType = 0;

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
Exemple #27
0
    private void StartDancing()
    {
        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        mgr.ChangeScene(mgr.cShareData.lstBuildingData[mgr.cShareData.cCurSongData.nWhereScene].str3DSceneName);
        mgr.cShareData.nDancingEntranceType = 2;

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    private void GotoShop()
    {
        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        mgr.ChangeScene("UI_Shop");
        mgr.cShareData.nShopEntranceType = 3;

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }
    IEnumerator ShowReady(float timevalue)
    {
        yield return(new WaitForSeconds(timevalue));

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("v_ready");

        SprReady.animation.Play();
        SprReady.enabled = true;
    }
    private void ReturnOutside()
    {
        showDialog(false);

        SceneManager mgr = Singlton.getInstance("SceneManager") as SceneManager;

        mgr.ChangeScene("UI_MyHome_Outside");

        NvSoundController soundctr = Singlton.getInstance("NvSoundController") as NvSoundController;

        soundctr.PlaySe("ui_touch");
    }