Commit 9c60d905 authored by LiLiuZhou's avatar LiLiuZhou

111

parents 5d5ee57f 93ff45fb
fileFormatVersion: 2
guid: 3bdf81920b9ea8e46abd100e083eefe7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 699ec949cb5539f48b04345cd60af6dd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: b0fdeff412c9a1f4e82faa8ef0aeb063
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -58,7 +58,7 @@ public class HomePresenter : HomeContract.Presenter
public void GetHomeInfo()
{
Debug.Log("请求主页信息接口");
HttpTool.Instance._Get("app/v1/wdlc/home_info", null, new Action<HomeInfoBean>((bean) =>
HttpTool.Instance._Get("app/v2/cscmnq/home_info", null, new Action<HomeInfoBean>((bean) =>
{
PlayerDataControl.Instance.VideoUnlockCarID = bean.unlockLandByVideoId;
PlayerDataControl.Instance.diamondByVideoRewardNum = bean.diamondByVideoRewardNum;
......
......@@ -141,7 +141,7 @@ public class AdUtils
{
EventUtils.OnEvent("reward_reduceAllTime", "激励视频_及时雨");
}
else if (actionName.Equals("diamond_reward"))
else if (actionName.Equals("diamond_reward_v2"))
{
EventUtils.OnEvent("reward_addDiamond", "激励视频_领取钻石");
}
......
......@@ -325,24 +325,24 @@ public class CarUIControl : MonoBehaviour
public Text fruitTimeTv;
public void setTime(LandListData entity)
{
//if (entity.landPlantData == null)
//{
// return;
//}
//stopTime = (int)entity.landPlantData.appearWormCountdownSecond;
//totalTime = (int)entity.landPlantData.growthAllSecond;
//currentCarTime = (int)entity.landPlantData.growthLastSecond;
////设置暂停状态
//setPauseTime(currentCarTime);
////关闭上一次倒计时
//if (timeControl != null)
//{
// StopCoroutine(timeControl);
//}
//if (currentCarTime > 0)
//{
// timeControl = StartCoroutine(timeConteller());
//}
if (entity.landPlantData == null)
{
return;
}
stopTime = (int)entity.landPlantData.appearWormCountdownSecond;
totalTime = (int)entity.landPlantData.growthAllSecond;
currentCarTime = (int)entity.landPlantData.growthLastSecond;
//设置暂停状态
setPauseTime(currentCarTime);
//关闭上一次倒计时
if (timeControl != null)
{
StopCoroutine(timeControl);
}
if (currentCarTime > 0)
{
timeControl = StartCoroutine(timeConteller());
}
}
......@@ -355,6 +355,7 @@ public class CarUIControl : MonoBehaviour
if (progressBarImg != null)
{
progressBarImg.fillAmount = 1 - (currentCarTime / (float)totalTime);
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()
{
......@@ -489,9 +490,10 @@ public class DialogControl : MonoBehaviour
Invoke("moveDiamondDialog", 1f);
//#endif
HttpTool.Instance._Get("app/v1/wdlc/reward/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;
DiamondRewardNum = bean.rewardDiamondNum;
tv_diamond_num.text = bean.rewardDiamondNum.ToString();
tv_diamond_times.text = "每天0点重置视频次数(剩余"+DiamondplayNum+ "次)";
}), new Action<string, string>((code, errMsg) =>
......@@ -540,10 +542,14 @@ public class DialogControl : MonoBehaviour
HttpTool.Instance._Get("app/v2/cscmnq/diamond_by_video_status", null, new Action<DiamondStatusBean>((bean) =>
{
DiamondplayNum = bean.playNum;
<<<<<<< HEAD
=======
DiamondRewardNum = bean.rewardDiamondNum;
>>>>>>> 93ff45fb604960c0d9e04b58f0749838d58dde01
if (DiamondplayNum > 0)
{
rdp.Show(bean.playNum);
rdp.Show(bean.rewardDiamondNum);
}
else
{
......@@ -1232,14 +1238,14 @@ public class DialogControl : MonoBehaviour
public void LookvideoGetDiamond()
{
AdUtils.PlayRewardAd("diamond_reward", new Action<bool>((cb) =>
AdUtils.PlayRewardAd("diamond_reward_v2", new Action<bool>((cb) =>
{
if (cb)
{
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);
......@@ -1249,6 +1255,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