|
@@ -144,7 +144,8 @@ public class HomeController : MonoBehaviour
|
|
|
//GameData.focusDog = UserProperty.GetDogIndexById(dog.dogProperty.d_id);
|
|
|
dogsInScene[GameData.focusDog].SetupInteract();
|
|
|
interactDog = dogsInScene[GameData.focusDog].gameObject;
|
|
|
- GameData.isVoiceTrainingToday = true;
|
|
|
+ // GameData.isVoiceTrainingToday = true;
|
|
|
+ GameData.SetIsVoiceTrainingToday(); // 设置当天已经完成了语音训练
|
|
|
VoiceButtonOnlySwitch(true); // 交互模式下关闭其他菜单
|
|
|
}
|
|
|
}
|
|
@@ -175,7 +176,8 @@ public class HomeController : MonoBehaviour
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- GameData.isVoiceTrainingToday = true;
|
|
|
+ // GameData.isVoiceTrainingToday = true;
|
|
|
+ GameData.SetIsVoiceTrainingToday(); // 设置当天已经完成了语音训练
|
|
|
}
|
|
|
}
|
|
|
else if (dog.dogProperty.voiceCommand >= 40 && dog.dogProperty.CommandTrainingPhase() >= 4)
|
|
@@ -216,7 +218,7 @@ public class HomeController : MonoBehaviour
|
|
|
//GameData.focusDog = UserProperty.GetDogIndexById(dog.dogProperty.d_id);
|
|
|
dogsInScene[GameData.focusDog].SetupInteract();
|
|
|
interactDog = dogsInScene[GameData.focusDog].gameObject;
|
|
|
- GameData.isVoiceTrainingToday = true;
|
|
|
+ GameData.SetIsVoiceTrainingToday(); // 设置当天已经完成了语音训练
|
|
|
VoiceButtonOnlySwitch(true); // 交互模式下关闭其他菜单
|
|
|
}
|
|
|
}
|
|
@@ -701,11 +703,7 @@ public class HomeController : MonoBehaviour
|
|
|
this.sceneMode = SceneMode.NORMAL;
|
|
|
VoiceButtonOnlySwitch(false); // 交互结束,打开其他菜单
|
|
|
|
|
|
- GameData.isVoiceTrainingToday = true; // 训练完成,设置为true
|
|
|
- string todayDate = System.DateTime.Now.ToString("yyyy-MM-dd");
|
|
|
- PlayerPrefs.SetString("lastTrainingDate", todayDate);
|
|
|
- PlayerPrefs.Save();
|
|
|
-
|
|
|
+ GameData.SetIsVoiceTrainingToday(); // 设置当天已经完成了语音训练
|
|
|
}
|
|
|
else if (data["message"].ToString() == "fail")
|
|
|
{
|
|
@@ -764,7 +762,7 @@ public class HomeController : MonoBehaviour
|
|
|
sceneMode = SceneMode.NORMAL; // 交互模式
|
|
|
Debug.Log("Reset Training Mode Parameters");
|
|
|
GameTool.ResumeGameTime();
|
|
|
- GameData.isVoiceTrainingToday = true; // 训练完成,设置为true
|
|
|
+ GameData.SetIsVoiceTrainingToday(); // 训练完成,设置为true
|
|
|
var BGM = GameObject.Find("BGM");
|
|
|
if (BGM != null)
|
|
|
{
|