Esempio n. 1
0
 // Update is called once per frame
 void Update()
 {
     if (flag_S == 1 && allowSaveData)
     {
         hd = new GameObject();
         hd.AddComponent <SaveHandData>();
         handData = (SaveHandData)hd.GetComponent(typeof(SaveHandData));
         handData.Init(200, path);
         PlayerPrefs.SetString("standardHandDataPath", handData.savedDataPath);
         Debug.Log("ready to save data: " + handData.savedDataPath);
         allowSaveData = false;
     }
     if (flag_S == 1 && handData.IsSaveCompleted())
     {
         Debug.Log("save completed detected!");
         flag_S = 0;
     }
 }
Esempio n. 2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Q) && allowSaveData)
     {
         hd = new GameObject();
         hd.AddComponent <SaveHandData>();
         handData = (SaveHandData)hd.GetComponent(typeof(SaveHandData));
         handData.Init(200, "/Datas/test03.json");
         PlayerPrefs.SetString("patientHandDataPath", handData.savedDataPath);
         Debug.Log("Ready to save data:" + handData.savedDataPath);
         allowSaveData = false;
     }
     if (!allowSaveData)
     {
         if (handData.IsSaveCompleted())
         {
             Debug.Log("Save complete detected");
         }
     }
 }