|
|
|
@@ -1,13 +1,10 @@
|
|
|
|
|
using FairyGUI;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace FlowerPower
|
|
|
|
|
namespace LoveLegend
|
|
|
|
|
{
|
|
|
|
|
public class ChoosePropUI : BaseUI
|
|
|
|
|
{
|
|
|
|
|
private ChoosePropUICtrl ctrl;
|
|
|
|
|
private ChoosePropModel model;
|
|
|
|
|
private FGUI.P09_ChooseProp.com_choose ui;
|
|
|
|
|
private FGUI.ZM_Prop_09.com_choose ui;
|
|
|
|
|
|
|
|
|
|
public ChoosePropUI(ChoosePropUICtrl ctrl) : base(ctrl)
|
|
|
|
|
{
|
|
|
|
@@ -17,7 +14,7 @@ namespace FlowerPower
|
|
|
|
|
|
|
|
|
|
protected override void SetUIInfo(UIInfo uiInfo)
|
|
|
|
|
{
|
|
|
|
|
uiInfo.packageName = "P09_ChooseProp";
|
|
|
|
|
uiInfo.packageName = "ZM_Prop_09";
|
|
|
|
|
uiInfo.assetName = "com_choose";
|
|
|
|
|
uiInfo.layerType = UILayerType.Popup;
|
|
|
|
|
uiInfo.isNeedOpenAnim = false;
|
|
|
|
@@ -37,7 +34,7 @@ namespace FlowerPower
|
|
|
|
|
|
|
|
|
|
protected override void OnBind()
|
|
|
|
|
{
|
|
|
|
|
ui = baseUI as FGUI.P09_ChooseProp.com_choose;
|
|
|
|
|
ui = baseUI as FGUI.ZM_Prop_09.com_choose;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnOpenBefore(object args)
|
|
|
|
@@ -74,11 +71,11 @@ namespace FlowerPower
|
|
|
|
|
{
|
|
|
|
|
// Debug.Log(GameHelper.GetLevelstate());
|
|
|
|
|
int state = GameHelper.GetLevelstate();
|
|
|
|
|
int need_gold = ConfigSystem.GetConfig<CommonModel>().RevivalCoins;
|
|
|
|
|
int need_gold = ConfigSystem.GetCommonConf().RevivalCoins;
|
|
|
|
|
ui.btn_gold_buy.GetChild("text_gold").text = GameHelper.Get101Str(need_gold);
|
|
|
|
|
|
|
|
|
|
initProp(state);
|
|
|
|
|
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) (ui.btn_ad.GetChild("img_saveingpot") as GImage).visible = true;
|
|
|
|
|
|
|
|
|
|
ui.btn_thanks.SetClick(() =>
|
|
|
|
|
{
|
|
|
|
|
float[] ch_array = GameHelper.GetRewardValue(2);
|
|
|
|
@@ -87,8 +84,9 @@ namespace FlowerPower
|
|
|
|
|
temp.ch_number = ch_array[0];
|
|
|
|
|
temp.IsLevelSuccess = true;
|
|
|
|
|
temp.IsH5Reward = false;
|
|
|
|
|
temp.boost_array=GameHelper.GetRewardBoost(2);
|
|
|
|
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Open, temp);
|
|
|
|
|
temp.boost_array = GameHelper.GetRewardBoost(2);
|
|
|
|
|
temp.level = GameHelper.GetLevel();
|
|
|
|
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NewEndUI_Open, temp);
|
|
|
|
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
@@ -101,8 +99,9 @@ namespace FlowerPower
|
|
|
|
|
temp.ch_number = ch_array[0];
|
|
|
|
|
temp.IsLevelSuccess = true;
|
|
|
|
|
temp.IsH5Reward = false;
|
|
|
|
|
temp.boost_array=GameHelper.GetRewardBoost(2);
|
|
|
|
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Open, temp);
|
|
|
|
|
temp.boost_array = GameHelper.GetRewardBoost(2);
|
|
|
|
|
temp.level = GameHelper.GetLevel();
|
|
|
|
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NewEndUI_Open, temp);
|
|
|
|
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@@ -111,7 +110,7 @@ namespace FlowerPower
|
|
|
|
|
|
|
|
|
|
private void initProp(int state)
|
|
|
|
|
{
|
|
|
|
|
int need_gold = ConfigSystem.GetConfig<CommonModel>().RevivalCoins;
|
|
|
|
|
int need_gold = ConfigSystem.GetCommonConf().RevivalCoins;
|
|
|
|
|
|
|
|
|
|
if (state == 3)
|
|
|
|
|
{
|
|
|
|
@@ -141,7 +140,7 @@ namespace FlowerPower
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
GameHelper.ShowTips("Not enough gold");
|
|
|
|
|
GameHelper.ShowTips("no_enough_gold", true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
@@ -179,7 +178,7 @@ namespace FlowerPower
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
GameHelper.ShowTips("Not enough gold");
|
|
|
|
|
GameHelper.ShowTips("no_enough_gold", true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
@@ -187,4 +186,4 @@ namespace FlowerPower
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|