Skip to content

Commit

Permalink
小数点第1位で表示されるように/スコア保存フォーマット変更
Browse files Browse the repository at this point in the history
スコアを保存するときは、小数を10倍して記録すること!
  • Loading branch information
RyoRyo-2010 committed Nov 15, 2023
1 parent 78b245f commit 2901142
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Assets/Scenes/CheckScores.unity
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0b019bcd40014b14fb8d184195bd64dd, type: 3}
m_Name:
m_EditorClassIdentifier:
FirstJson: {fileID: 0}
ScoreText: {fileID: 0}
FirstJson: {fileID: 4900000, guid: b0ce01c8d7b01444b8a0681bc09bd2f1, type: 3}
ScoreText: {fileID: 200360276}
--- !u!4 &1661654157
Transform:
m_ObjectHideFlags: 0
Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/CheckScores/ScoreManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void Start()
//画面に表示させる
foreach(Score s in Scores.scores)
{
scoreText += $"{s.rank}.{s.date} {s.score}{Environment.NewLine}";
scoreText += $"{s.rank}.{s.date} {s.score/10.0f}{Environment.NewLine}";
}
ScoreText.text = scoreText;
}
Expand All @@ -61,5 +61,5 @@ public class Score
{
public int rank { get; set; }
public string date { get; set; }
public int score { get; set; }
public long score { get; set; }//10で割ること
}

0 comments on commit 2901142

Please sign in to comment.