added sounds
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class ScoreService
|
||||
{
|
||||
public int score=0;
|
||||
public int highScore=0;
|
||||
public int highScore=PlayerPrefs.GetInt("HighScore",0);
|
||||
|
||||
public void AddScore()
|
||||
{
|
||||
@@ -18,6 +19,7 @@ public class ScoreService
|
||||
{
|
||||
highScore = score;
|
||||
PlayerPrefs.SetInt("HighScore", highScore);
|
||||
PlayerPrefs.Save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user