public void AddDeviceInfo(string mac, string name, string service_uuid) { foreach (DeviceInfo i in DEVICES) { if (i.MAC.STR.Equals(mac)) { return; } } DEVICES.Add(new DeviceInfo(KEY + N.Get() + "h", mac, name, service_uuid)); DEVICES[DEVICES.Count - 1].Save(); N.SetAndSave(DEVICES.Count); }
void Start() { //PlayerPrefs.DeleteAll(); SAVED_CONTENT = new SuperString("http://stgame.vn|Pikachu 2016|ads_pika2016.png", "tads534"); LOAD_COUNT = new SuperInt(0, "tadsloadcount"); //GetADS(); //ParseCONTENT(SAVED_CONTENT.STR, true); //return; if (LOAD_COUNT.Get() == 0) { Debug.Log("loading new ads"); GetADS(); } else { Debug.Log("no: load saved ads"); LOAD_COUNT.PlusAndSave(1); if (LOAD_COUNT.Get() >= 5) { LOAD_COUNT.SetAndSave(0); } ParseCONTENT(SAVED_CONTENT.STR, true); } //AAdsLabel a = new AAdsLabel(null, null, null, null, null, null, null); //SerializedData }
public bool AddUserInfo(string user, string pass, int id) { foreach (UserInfo i in USERS) { if (i.ID.Get() == id) { return(false); } if (i.USER.STR.Equals(user)) { return(false); } } USERS.Add(new UserInfo(KEY + N.Get() + "h", user, pass, id)); USERS[USERS.Count - 1].Save(); N.SetAndSave(USERS.Count); return(true); }
void Start() { SAVED_CONTENT = new SuperString("http://stgame.vn|Pikachu 2016|ads_pika2016.png", "tads534"); LOAD_COUNT = new SuperInt(0, "tadsloadcount"); if (LOAD_COUNT.Get() == 0) { Debug.Log("loading new ads"); GetADS(); } else { Debug.Log("no: load saved ads"); LOAD_COUNT.PlusAndSave(1); if (LOAD_COUNT.Get() >= 5) { LOAD_COUNT.SetAndSave(0); } ParseCONTENT(SAVED_CONTENT.STR, true); } }