Const用于储存字符串,统一管理,减少耦合。
public class Const
{
public const string gameMode_1 = "gameMode_1";
public const string Sound = "Sound";
public const string Music = "Music";
public const string BestScore = "BestScore";
}
//需要使用的时候直接Const调用
PlayerPrefs.SetInt(Const.gameMode_1, count);