Commit 93ff45fb authored by zhangzhe's avatar zhangzhe

修改钻石问题

parent 2af1b224
...@@ -355,7 +355,7 @@ public class CarUIControl : MonoBehaviour ...@@ -355,7 +355,7 @@ public class CarUIControl : MonoBehaviour
if (progressBarImg != null) if (progressBarImg != null)
{ {
progressBarImg.fillAmount = 1 - (currentCarTime / (float)totalTime); progressBarImg.fillAmount = 1 - (currentCarTime / (float)totalTime);
fruitTimeTv.text = ((1 - (currentCarTime / (float)totalTime)) * 100).ToString() + "%"; fruitTimeTv.text = ((1 - (currentCarTime / (float)totalTime)) * 100).ToString("f0") + "%";
} }
yield return new WaitForSecondsRealtime(1f); yield return new WaitForSecondsRealtime(1f);
if (currentCarTime <= 0) if (currentCarTime <= 0)
......
...@@ -476,6 +476,7 @@ public class DialogControl : MonoBehaviour ...@@ -476,6 +476,7 @@ public class DialogControl : MonoBehaviour
} }
} }
private int DiamondplayNum; private int DiamondplayNum;
private int DiamondRewardNum;
//展示获取钻石弹窗 //展示获取钻石弹窗
public void showDiamondDialog() public void showDiamondDialog()
{ {
...@@ -492,6 +493,7 @@ public class DialogControl : MonoBehaviour ...@@ -492,6 +493,7 @@ public class DialogControl : MonoBehaviour
HttpTool.Instance._Get("app/v2/cscmnq/diamond_by_video_status", parm, new Action<DiamondStatusBean>((bean) => HttpTool.Instance._Get("app/v2/cscmnq/diamond_by_video_status", parm, new Action<DiamondStatusBean>((bean) =>
{ {
DiamondplayNum = bean.playNum; DiamondplayNum = bean.playNum;
DiamondRewardNum = bean.rewardDiamondNum;
tv_diamond_num.text = bean.rewardDiamondNum.ToString(); tv_diamond_num.text = bean.rewardDiamondNum.ToString();
tv_diamond_times.text = "每天0点重置视频次数(剩余"+DiamondplayNum+ "次)"; tv_diamond_times.text = "每天0点重置视频次数(剩余"+DiamondplayNum+ "次)";
}), new Action<string, string>((code, errMsg) => }), new Action<string, string>((code, errMsg) =>
...@@ -540,9 +542,10 @@ public class DialogControl : MonoBehaviour ...@@ -540,9 +542,10 @@ public class DialogControl : MonoBehaviour
HttpTool.Instance._Get("app/v2/cscmnq/diamond_by_video_status", null, new Action<DiamondStatusBean>((bean) => HttpTool.Instance._Get("app/v2/cscmnq/diamond_by_video_status", null, new Action<DiamondStatusBean>((bean) =>
{ {
DiamondplayNum = bean.playNum; DiamondplayNum = bean.playNum;
DiamondRewardNum = bean.rewardDiamondNum;
if (DiamondplayNum > 0) if (DiamondplayNum > 0)
{ {
rdp.Show(bean.playNum); rdp.Show(bean.rewardDiamondNum);
} }
else else
{ {
...@@ -1238,7 +1241,7 @@ public class DialogControl : MonoBehaviour ...@@ -1238,7 +1241,7 @@ public class DialogControl : MonoBehaviour
HttpTool.Instance._Post("app/v2/cscmnq/receive_diamond_by_video", null, new Action<RewardData>((bean) => HttpTool.Instance._Post("app/v2/cscmnq/receive_diamond_by_video", null, new Action<RewardData>((bean) =>
{ {
//Lee //Lee
showReceiveDiamondDialog(DiamondplayNum.ToString()); showReceiveDiamondDialog(DiamondRewardNum.ToString());
rdp.Hide(); rdp.Hide();
// EventCenter.Broadcast(MyEventType.UPDATE_CAR_LIST_DATA); // EventCenter.Broadcast(MyEventType.UPDATE_CAR_LIST_DATA);
...@@ -1248,6 +1251,7 @@ public class DialogControl : MonoBehaviour ...@@ -1248,6 +1251,7 @@ public class DialogControl : MonoBehaviour
})); }));
} }
rdp.Hide(); rdp.Hide();
closeDiamondDialog();
})); }));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment