void Awake() { if (UserManagerCloud.Instance.GetScoreForLevel(Match3BoardRenderer.levelIdx) > 0) { //level already finished Destroy(this); } else { instance = this; } }
public static UnlockSystem getInstance() { if (instance == null) { //初始化 instance = new UnlockSystem(); //读取存档信息 } return instance; }
void Awake() { if (UserManagerCloud.Instance.GetScoreForLevel(Match3BoardRenderer.levelIdx) > 0) //level already finished { Destroy(this); } else { instance = this; } }
void Start() { UnlockSystem unlockSystem = UnlockSystem.Instance; if (unlockSystem == null) { Debug.LogWarning("No unlock system"); return; } available = true; myLabel = GetComponent <UILabel>(); myLabel.text = Language.Get(unlockSystem.textKey); icon.spriteName = unlockSystem.iconName; }