Commit 93ff45fb authored by zhangzhe's avatar zhangzhe

修改钻石问题

parent 2af1b224
......@@ -355,7 +355,7 @@ public class CarUIControl : MonoBehaviour
if (progressBarImg != null)
{
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);
if (currentCarTime <= 0)
......
......@@ -476,6 +476,7 @@ public class DialogControl : MonoBehaviour
}
}
private int DiamondplayNum;
private int DiamondRewardNum;
//展示获取钻石弹窗
public void showDiamondDialog()
{
......@@ -492,6 +493,7 @@ public class DialogControl : MonoBehaviour
HttpTool.Instance._Get("app/v2/cscmnq/diamond_by_video_status", parm, new Action<DiamondStatusBean>((bean) =>
{
DiamondplayNum = bean.playNum;
DiamondRewardNum = bean.rewardDiamondNum;
tv_diamond_num.text = bean.rewardDiamondNum.ToString();
tv_diamond_times.text = "每天0点重置视频次数(剩余"+DiamondplayNum+ "次)";
}), new Action<string, string>((code, errMsg) =>
......@@ -540,9 +542,10 @@ public class DialogControl : MonoBehaviour
HttpTool.Instance._Get("app/v2/cscmnq/diamond_by_video_status", null, new Action<DiamondStatusBean>((bean) =>
{
DiamondplayNum = bean.playNum;
DiamondRewardNum = bean.rewardDiamondNum;
if (DiamondplayNum > 0)
{
rdp.Show(bean.playNum);
rdp.Show(bean.rewardDiamondNum);
}
else
{
......@@ -1238,7 +1241,7 @@ public class DialogControl : MonoBehaviour
HttpTool.Instance._Post("app/v2/cscmnq/receive_diamond_by_video", null, new Action<RewardData>((bean) =>
{
//Lee
showReceiveDiamondDialog(DiamondplayNum.ToString());
showReceiveDiamondDialog(DiamondRewardNum.ToString());
rdp.Hide();
// EventCenter.Broadcast(MyEventType.UPDATE_CAR_LIST_DATA);
......@@ -1248,6 +1251,7 @@ public class DialogControl : MonoBehaviour
}));
}
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