【隐私协议】文字内容由代码控制

dev_chengFeng
gaoxin 2021-10-27 17:03:47 +08:00
parent 2b74430e61
commit f9417e0746
2 changed files with 21 additions and 4 deletions

View File

@ -247,7 +247,7 @@ namespace GameLogic {
/// <param name="strL"></param>
/// <param name="strR"></param>
/// <param name="msg"></param>
public void ShowProto(string strL, string strR, UnityAction<int> action)
public void ShowProto(string strL, string strR, string msg, UnityAction<int> action)
{
this.gameObject.SetActive(true);
this.msg.gameObject.SetActive(false);
@ -259,6 +259,8 @@ namespace GameLogic {
this.buttonLText.text = strL;
this.buttonRText.text = strR;
this.action = action;
//设置显示内容
this.proto.GetComponent<Text>().text = msg;
}
/// <summary>
/// 显示权限申请
@ -266,7 +268,7 @@ namespace GameLogic {
/// <param name="strL"></param>
/// <param name="strR"></param>
/// <param name="msg"></param>
public void ShowGrant(string strC, UnityAction<int> action)
public void ShowGrant(string strC, string msg, UnityAction<int> action)
{
this.gameObject.SetActive(true);
this.msg.gameObject.SetActive(false);
@ -277,6 +279,8 @@ namespace GameLogic {
this.buttonC.gameObject.SetActive(true);
this.buttonCText.text = strC;
this.action = action;
//设置显示内容
this.grant.transform.Find("Scroll View/Viewport/Text").GetComponent<Text>().text = msg;
}
}

View File

@ -141,11 +141,24 @@ namespace GameLogic
return;
}
// 没同意则弹窗提示
msgBox.ShowProto("不同意", "同意", (r1) =>
string proto = "在您使用我们(猕猴桃)的服务前,请您务必审慎阅读、" +
"充分理解<color=#00A7FF>猕猴桃用户协议</color>和<color=#00A7FF>猕猴桃隐私政策</color>的各条款。" +
"<color=#FFFAD4><b>同时,您应特别注意前述协议中免除或者限制我们责任的条款、对您权利进行限制的、约定争议解决方式和司法管辖的条款。" +
"</b></color>如您已经详细阅读并同意<color=#00A7FF>猕猴桃用户协议</color>和<color=#00A7FF>猕猴桃隐私政策</color>" +
"请点击“同意”开始使用我们的服务。";
msgBox.ShowProto("不同意", "同意", proto, (r1) =>
{
if (r1 == 1)
{
msgBox.ShowGrant("确定", (result) =>
string grant = "为确保您的游戏体验,我们将在您使用我们的服务过程中申请以下权限,届时您可以选择同意或者拒绝开启相关权限,若是拒绝则会影响部分功能:" +
"\n\n" +
"<b> 储存权限 </b>" +
"我们访问您的储存权限是为了向您提供游戏截图保存功能" +
"\n\n" +
"<b> 电话权限 </b>" +
"我们访问您的电话权限是为了分析游戏的运行状态,优化游戏体验";
msgBox.ShowGrant("确定", grant,(result) =>
{
PlayerPrefs.SetInt("APP_IsAgreeUser", 1);
if (a != null)