Commit 5b0d9dbf authored by zhangzhe's avatar zhangzhe

no message

parent 9b00e133
...@@ -127,20 +127,21 @@ public class CarPresenter : CarContract.Presenter ...@@ -127,20 +127,21 @@ public class CarPresenter : CarContract.Presenter
mView.showFlyFruit(); mView.showFlyFruit();
} }
#else #else
// mView.showFlyFruit(); // mView.showFlyFruit();
#endif #endif
Guide.guide.onClickStep3(); Guide.guide.onClickStep3();
//EventUtils.OnEvent("newUser_cashOut", "当日新用户完成引导提现"); //EventUtils.OnEvent("newUser_cashOut", "当日新用户完成引导提现");
EventCenter.Broadcast(MyEventType.FlyRedPack,landId); EventCenter.Broadcast(MyEventType.FlyRedPack, landId);
// EventCenter.Broadcast(MyEventType.FlyGuoshi, landId); // EventCenter.Broadcast(MyEventType.FlyGuoshi, landId);
mView.CarInfo(bean.landStatusDTO); mView.CarInfo(bean.landStatusDTO);
EventCenter.Broadcast(MyEventType.ShowCashTrips, bean.harvestPlantPrice.ToString()); EventCenter.Broadcast(MyEventType.ShowCashTrips, bean.harvestPlantPrice.ToString());
EventCenter.Broadcast(MyEventType.RefreshHomeInfo); EventCenter.Broadcast(MyEventType.RefreshHomeInfo);
EventCenter.Broadcast(MyEventType.RefreshFirstInfo); EventCenter.Broadcast(MyEventType.RefreshFirstInfo);
if (bean.rewardCash > 0) if (bean.rewardCash > 0)
{ {
GameObject.Find("Dialog").GetComponent<DialogControl>().ShowJingxiDialog(); GameObject.Find("Dialog").GetComponent<DialogControl>().ShowJingxiDialog();
} }
LeeMainController.Instance.UpdateTitleBG2Info();
}), new Action<string, string>((code, errMsg) => }), new Action<string, string>((code, errMsg) =>
{ {
......
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 首页点击任务快捷种植
/// </summary>
public class FastPlanting : SingletonMono<FastPlanting>
{
public List<LandListData> landListDatas = new List<LandListData>();
/// <summary>
/// 在第一个可用的地块上种植蔬菜
/// </summary>
/// <param name="plantId">要种植的蔬菜id</param>
public void Planting(int plantId)
{
// 是否有未解锁的菜地
bool ifLocking = false;
// 是否可以种植
bool ifCanPlanting = false;
foreach (var item in landListDatas)
{
if (item.status == 1)
{
ifCanPlanting = true;
Dictionary<string, object> parameters = new Dictionary<string, object>();
parameters["landId"] = item.landId;
parameters["plantId"] = plantId;
HttpTool.Instance._Post("app/v2/cscmnq/seed", parameters, new Action<LandListData>((bean) =>
{
FindObjectOfType<HomeInfoControl>().OnUpdateCarListData();
}), new Action<string, string>((code, errMsg) =>
{
}));
return;
}
if (item.status == 0)
{
ifLocking = true;
}
}
if (!ifCanPlanting)
{
if (ifLocking)
{
ToastPlugin.ToastHelper.ShowToast("没有地方种菜了,快去解锁土地吧");
}
else
{
ToastPlugin.ToastHelper.ShowToast("最多只能同时种植6颗蔬菜哦");
}
}
}
}
fileFormatVersion: 2
guid: c649e2248d43e47e99dda0da4b673d83
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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