Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e4a3858

Browse files
adding soft clamp to score
1 parent 9b086dc commit e4a3858

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎Data/DataController.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public int Score {
2828
return GetInt(DATA_SCORE);
2929
}
3030
set {
31+
// soft clamp value at 0
32+
if (value < 0) {
33+
value = 0;
34+
}
35+
3136
SaveInt(DATA_SCORE, value);
3237
int _score = this.Score;
3338
if (_score > this.Highscore) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /