fix result
This commit is contained in:
parent
61b6f17673
commit
d75e696864
|
|
@ -31,11 +31,6 @@ namespace MyGame.Scenes.MiniGame.Scripts
|
|||
|
||||
public void ShowResult(int score, ScrollGamePlaceData[] placeList, ScrollGameStageData stageData)
|
||||
{
|
||||
/*
|
||||
* result view 初期化&表示
|
||||
* 獲得処理
|
||||
* ステージ開放処理
|
||||
*/
|
||||
var gameData = GameDataManager.GameData;
|
||||
var shopDataList = SpreadsheetDataManager.Instance.GetBaseDataList<ShopData>(Const.ShopDataSheet);
|
||||
|
||||
|
|
@ -60,7 +55,7 @@ namespace MyGame.Scenes.MiniGame.Scripts
|
|||
}
|
||||
|
||||
// スコア更新
|
||||
stageScoreData.Score = Math.Min(stageScoreData.Score, score);
|
||||
stageScoreData.Score = Math.Max(stageScoreData.Score, score);
|
||||
var prevPlaceScore = placeScoreData.Score;
|
||||
placeScoreData.Score += score;
|
||||
|
||||
|
|
@ -89,7 +84,6 @@ namespace MyGame.Scenes.MiniGame.Scripts
|
|||
GameDataManager.SaveGameData();
|
||||
|
||||
// view
|
||||
|
||||
gameObject.SetActive(true);
|
||||
titleObject.SetActive(true);
|
||||
detailObject.SetActive(true);
|
||||
|
|
@ -129,11 +123,12 @@ namespace MyGame.Scenes.MiniGame.Scripts
|
|||
|
||||
private void SetProgress(float newValue, bool animated = true, Action onComplete = null)
|
||||
{
|
||||
var prevProgress = progressValue;
|
||||
var prevValue = progressValue;
|
||||
newValue = Mathf.Clamp01(newValue);
|
||||
progressValue = newValue;
|
||||
this.CallLerp(animated ? progressDuration : 0f, f =>
|
||||
{
|
||||
var value = Mathf.Lerp(prevProgress, newValue, f.EaseOutQuadratic());
|
||||
var value = Mathf.Lerp(prevValue, newValue, f.EaseOutQuadratic());
|
||||
meterProgressText.text = $"{value * 100:0}%";
|
||||
meterProgressImage.fillAmount = value;
|
||||
}, () => onComplete?.Invoke());
|
||||
|
|
|
|||
Loading…
Reference in New Issue