切换移动端暂存
This commit is contained in:
1 parent
f14a071179
commit
ca91f45ef3
15 files changed
+201
-46
No files matched your search
@@ -53,20 +53,8 @@ public class HomeController : PFUIPanel
|
||||
BtnTraining = BtnContainer.Find("BtnTraining");
|
||||
UIManager.AddEvent(BtnTraining.gameObject, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
var path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\PowerFun\Rhino.PowerFun.exe";
|
||||
//Debug.Log(System.IO.File.Exists(path + ));
|
||||
if (!System.IO.File.Exists(path))
|
||||
{
|
||||
//TODO: auto update
|
||||
UIManager.ShowDownloadWorkoutsPanel();
|
||||
//Application.OpenURL("https://powerfun.oss-cn-shanghai.aliyuncs.com/Releases/PowerFunWorkouts.exe");
|
||||
return;
|
||||
}
|
||||
UIManager.ShowConfirm("Switch to PowerFun Workouts?", "We will close the Powerfun and start PowerFun Workouts.", () =>
|
||||
{
|
||||
Utils.ExecFile(path);
|
||||
Application.Quit();
|
||||
});
|
||||
Debug.Log(Application.platform);
|
||||
goTraining(e);
|
||||
});
|
||||
UIManager.AddEvent(BtnTraining.gameObject, EventTriggerType.PointerEnter, OnHover);
|
||||
UIManager.AddEvent(BtnTraining.gameObject, EventTriggerType.PointerExit, OnExit);
|
||||
@@ -117,6 +105,27 @@ public class HomeController : PFUIPanel
|
||||
}
|
||||
OnExit(e);
|
||||
}
|
||||
void goTraining(BaseEventData e)
|
||||
{
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
var path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\PowerFun\Rhino.PowerFun.exe";
|
||||
//Debug.Log(System.IO.File.Exists(path + ));
|
||||
if (!System.IO.File.Exists(path))
|
||||
{
|
||||
//TODO: auto update
|
||||
UIManager.ShowDownloadWorkoutsPanel();
|
||||
//Application.OpenURL("https://powerfun.oss-cn-shanghai.aliyuncs.com/Releases/PowerFunWorkouts.exe");
|
||||
return;
|
||||
}
|
||||
UIManager.ShowConfirm("Switch to PowerFun Workouts?", "We will close the Powerfun and start PowerFun Workouts.", () =>
|
||||
{
|
||||
Utils.ExecFile(path);
|
||||
Application.Quit();
|
||||
});
|
||||
#else
|
||||
Application.OpenURL("powerfun://app");
|
||||
#endif
|
||||
}
|
||||
//进入比赛
|
||||
private void GoMatch(BaseEventData e)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user