//指定した難易度に合わせて表示更新 private void changeDifficult(ScoreDifficult aDifficult) { //難易度 gameObject.GetComponentInChildren <DifficultDisplay>().set(mMusicData.getDifficult(aDifficult)); //最高得点 gameObject.GetComponentInChildren <ScoreDisplay>().set(mSelectedMusic.getPoint(aDifficult)); }
//ハイスコア更新(更新できたら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); }
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)); }
//ハイスコア更新 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); } }
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(); }
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)); }
//難易度 static public void setDifficult(ScoreDifficult aDifficult, int aLevel) { mMusicDate.setDifficult(aDifficult, aLevel); }
public int getDifficult(ScoreDifficult aDifficult) { return(mData.get <Arg>("difficult").get <int>(aDifficult.ToString())); }
public void setDifficult(ScoreDifficult aDifficult, int value) { mData.get <Arg>("difficult").set(aDifficult.ToString(), value); }
//最後に遊んだ情報を記録 static public void updateLastPlay(int aIndex, ScoreDifficult aDifficult) { mData.lastPlayIndex = aIndex; mData.lastPlayDifficult = aDifficult; mData.save(); }
public float getPoint(ScoreDifficult aDifficult) { return(mData.get <Arg>("point").get <float>(aDifficult.ToString())); }