Example #1
0
 //指定した難易度に合わせて表示更新
 private void changeDifficult(ScoreDifficult aDifficult)
 {
     //難易度
     gameObject.GetComponentInChildren <DifficultDisplay>().set(mMusicData.getDifficult(aDifficult));
     //最高得点
     gameObject.GetComponentInChildren <ScoreDisplay>().set(mSelectedMusic.getPoint(aDifficult));
 }
Example #2
0
    //ハイスコア更新(更新できたらtrue)
    public bool updatePoint(string aFile, ScoreDifficult aDifficult, float aPoint)
    {
        Arg tPoint = getData(aFile).get <Arg>("point");

        if (aPoint > tPoint.get <float>(aDifficult.ToString()))
        {
            tPoint.set(aDifficult.ToString(), aPoint);
            return(true);
        }
        return(false);
    }
Example #3
0
    void Start()
    {
        Arg tArg = MySceneManager.getArg("play");
        //Arg tArg = new Arg(new Dictionary<string, object>() { { "file", "kawaikunaritai" }, { "difficult", "guru" } });
        string         tFileName  = tArg.get <string>("file");
        ScoreDifficult tDifficult = tArg.get <ScoreDifficult>("difficult");

        mHandler = MyBehaviour.create <ScoreHandler>();
        mHandler.load(tFileName, tDifficult);
        mHandler.show(new KeyTime(-3));
        mHandler.changeState(new ScoreHandler.PlayState(mHandler));
    }
Example #4
0
    //ハイスコア更新
    static public bool updatePoint(string aFile, ScoreDifficult aDifficult, float aPoint)
    {
        bool tUpdate = mData.updatePoint(aFile, aDifficult, aPoint);

        if (tUpdate)
        {
            mData.save();
            return(true);
        }
        else
        {
            return(false);
        }
    }
Example #5
0
    public void set(MusicScoreFileData aData, ScoreDifficult aDifficult)
    {
        //譜面
        mScore = MyBehaviour.create <MusicScore>();
        //曲情報ロード
        MusicScoreData.set(aData);
        MusicScoreData.mSelectedDifficult = aDifficult;
        //ミュージックプレイヤー
        MusicPlayer tPlayer = MyBehaviour.create <MusicPlayer>();

        tPlayer.setAudio(DataFolder.loadMusic(MusicScoreData.mMusicFileName));
        //譜面と曲を同期させるシステム
        mPlayer = new KeyNotePlayer(mScore, tPlayer);
        //背景
        resetScoreBackground();
    }
Example #6
0
    void Start()
    {
        Arg            tArg       = MySceneManager.getArg("practice");
        string         tFileName  = tArg.get <string>("file");
        ScoreDifficult tDifficult = tArg.get <ScoreDifficult>("difficult");

        //難易度選択ボタン
        string tDifficultString = StringCaseConverter.ToUpper(tDifficult.ToString())[0] + tDifficult.ToString().Substring(1);

        GameObject.Find("difficultButton").GetComponent <MyListButton>().select(tDifficultString);

        mHandler = MyBehaviour.create <ScoreHandler>();
        mHandler.load(tFileName, tDifficult);
        mHandler.show(new KeyTime(0));
        mHandler.changeState(new ScoreHandler.PracticeState(mHandler));
    }
Example #7
0
 //難易度
 static public void setDifficult(ScoreDifficult aDifficult, int aLevel)
 {
     mMusicDate.setDifficult(aDifficult, aLevel);
 }
Example #8
0
 public int getDifficult(ScoreDifficult aDifficult)
 {
     return(mData.get <Arg>("difficult").get <int>(aDifficult.ToString()));
 }
Example #9
0
 public void setDifficult(ScoreDifficult aDifficult, int value)
 {
     mData.get <Arg>("difficult").set(aDifficult.ToString(), value);
 }
Example #10
0
 //最後に遊んだ情報を記録
 static public void updateLastPlay(int aIndex, ScoreDifficult aDifficult)
 {
     mData.lastPlayIndex     = aIndex;
     mData.lastPlayDifficult = aDifficult;
     mData.save();
 }
Example #11
0
 public float getPoint(ScoreDifficult aDifficult)
 {
     return(mData.get <Arg>("point").get <float>(aDifficult.ToString()));
 }