fix:1、添加跳链接的webview的插件。2、修复bug
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
using Gree.UnityWebView;
|
||||
using UnityEngine;
|
||||
|
||||
public class FreeWebViewManager : MonoBehaviour
|
||||
{
|
||||
public static FreeWebViewManager Instance;
|
||||
private GameObject _webObj;
|
||||
private WebViewObject1 _webView;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance != null) Destroy(gameObject);
|
||||
else
|
||||
{
|
||||
Instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
initView();
|
||||
}
|
||||
|
||||
public void initView()
|
||||
{
|
||||
if (_webObj != null) return;
|
||||
|
||||
// 创建WebView对象
|
||||
_webObj = new GameObject("WebViewObject1");
|
||||
_webView = _webObj.AddComponent<WebViewObject1>();
|
||||
|
||||
// 关键:开启WKWebView,规避苹果审核拒绝
|
||||
_webView.Init(
|
||||
enableWKWebView: true,
|
||||
cb: OnWebMessage // JS调用Unity回调
|
||||
);
|
||||
|
||||
float top_offset = 0;//fgui中的顶部信息的高度
|
||||
float buttom_offset = 155;
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
top_offset += Screen.safeArea.y;
|
||||
}
|
||||
|
||||
// 铺满屏幕,适配刘海安全区
|
||||
_webView.SetMargins(0, (int)top_offset, 0, (int)buttom_offset);
|
||||
// 禁止下拉回弹(可选)
|
||||
_webView.SetScrollBounceEnabled(false);
|
||||
|
||||
_webView.LoadURL("about:blank");
|
||||
_webView.SetVisibility(false);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 打开网页
|
||||
/// </summary>
|
||||
public void OpenWeb(string url)
|
||||
{
|
||||
// if (_webObj != null) return;
|
||||
//
|
||||
// // 创建WebView对象
|
||||
// _webObj = new GameObject("WebViewObject1");
|
||||
// _webView = _webObj.AddComponent<WebViewObject1>();
|
||||
//
|
||||
// // 关键:开启WKWebView,规避苹果审核拒绝
|
||||
// _webView.Init(
|
||||
// enableWKWebView: true,
|
||||
// cb: OnWebMessage // JS调用Unity回调
|
||||
// );
|
||||
//
|
||||
// float top_offset = 0;//fgui中的顶部信息的高度
|
||||
// float buttom_offset = 155;
|
||||
// if (Screen.safeArea.y != 0)
|
||||
// {//刘海屏
|
||||
// top_offset += Screen.safeArea.y;
|
||||
// }
|
||||
//
|
||||
// // 铺满屏幕,适配刘海安全区
|
||||
// _webView.SetMargins(0, (int)top_offset, 0, (int)buttom_offset);
|
||||
// // 禁止下拉回弹(可选)
|
||||
// _webView.SetScrollBounceEnabled(false);
|
||||
//
|
||||
// 加载网页并显示
|
||||
_webView.LoadURL(url);
|
||||
_webView.SetVisibility(true);
|
||||
}
|
||||
|
||||
// JS向Unity发消息:window.unity.call("func","参数")
|
||||
void OnWebMessage(string msg)
|
||||
{
|
||||
Debug.Log("收到网页消息:" + msg);
|
||||
}
|
||||
|
||||
// C#调用网页JS
|
||||
public void CallJs(string jsCode)
|
||||
{
|
||||
if (_webView != null)
|
||||
_webView.EvaluateJS(jsCode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭网页(必调用,释放原生资源)
|
||||
/// </summary>
|
||||
public void CloseWeb()
|
||||
{
|
||||
if (_webObj != null)
|
||||
{
|
||||
_webView.SetVisibility(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (_webObj != null)
|
||||
{
|
||||
_webView.SetVisibility(false);
|
||||
Destroy(_webObj);
|
||||
_webObj = null;
|
||||
_webView = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 04c76fa88d6e411bbe47d0cfa321fc13
|
||||
timeCreated: 1784015216
|
||||
@@ -85,5 +85,6 @@ namespace RedHotRoast
|
||||
public const string GameAgainCtrl = "GameAgainCtrl";
|
||||
public const string ArrowSettingCtrl = "ArrowSettingCtrl";
|
||||
public const string ArrowGameResultCtrl = "ArrowGameResultCtrl";
|
||||
public const string RedeemCodeCtrl = "RedeemCodeCtrl";
|
||||
}
|
||||
}
|
||||
@@ -83,5 +83,6 @@ namespace RedHotRoast
|
||||
public const string GameAgainModel = "GameAgainModel";
|
||||
public const string ArrowSettingModel = "ArrowSettingModel";
|
||||
public const string ArrowGameResultModel = "ArrowGameResultModel";
|
||||
public const string RedeemCodeModel = "RedeemCodeModel";
|
||||
}
|
||||
}
|
||||
@@ -77,6 +77,7 @@ namespace RedHotRoast
|
||||
moduleManager.AddModel(ModelConst.GameAgainModel, new GameAgainModel());
|
||||
moduleManager.AddModel(ModelConst.ArrowSettingModel, new ArrowSettingModel());
|
||||
moduleManager.AddModel(ModelConst.ArrowGameResultModel, new ArrowGameResultModel());
|
||||
moduleManager.AddModel(ModelConst.RedeemCodeModel, new RedeemCodeModel());
|
||||
}
|
||||
public static void AutoRegisterUICtrl()
|
||||
{
|
||||
@@ -154,6 +155,7 @@ namespace RedHotRoast
|
||||
moduleManager.AddUICtrl(UICtrlConst.GameAgainUICtrl, new GameAgainUICtrl());
|
||||
moduleManager.AddUICtrl(UICtrlConst.ArrowSettingUICtrl, new ArrowSettingUICtrl());
|
||||
moduleManager.AddUICtrl(UICtrlConst.ArrowGameResultUICtrl, new ArrowGameResultUICtrl());
|
||||
moduleManager.AddUICtrl(UICtrlConst.RedeemCodeUICtrl, new RedeemCodeUICtrl());
|
||||
}
|
||||
|
||||
public static void AutoRegisterCtrl()
|
||||
@@ -238,6 +240,7 @@ namespace RedHotRoast
|
||||
moduleManager.AddCtrl(CtrlConst.GameAgainCtrl, new GameAgainCtrl());
|
||||
moduleManager.AddCtrl(CtrlConst.ArrowSettingCtrl, new ArrowSettingCtrl());
|
||||
moduleManager.AddCtrl(CtrlConst.ArrowGameResultCtrl, new ArrowGameResultCtrl());
|
||||
moduleManager.AddCtrl(CtrlConst.RedeemCodeCtrl, new RedeemCodeCtrl());
|
||||
}
|
||||
|
||||
public static void AutoRegisterUIType()
|
||||
@@ -319,6 +322,7 @@ namespace RedHotRoast
|
||||
moduleManager.AddUIType(UIConst.GameAgainUI, typeof(GameAgainUI));
|
||||
moduleManager.AddUIType(UIConst.ArrowSettingUI, typeof(ArrowSettingUI));
|
||||
moduleManager.AddUIType(UIConst.ArrowGameResultUI, typeof(ArrowGameResultUI));
|
||||
moduleManager.AddUIType(UIConst.RedeemCodeUI, typeof(RedeemCodeUI));
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ namespace RedHotRoast
|
||||
public const string GameAgainUI = "GameAgainUI";
|
||||
public const string ArrowSettingUI = "ArrowSettingUI";
|
||||
public const string ArrowGameResultUI = "ArrowGameResultUI";
|
||||
public const string RedeemCodeUI = "RedeemCodeUI";
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -83,5 +83,6 @@ namespace RedHotRoast
|
||||
public const string GameAgainUICtrl = "GameAgainUICtrl";
|
||||
public const string ArrowSettingUICtrl = "ArrowSettingUICtrl";
|
||||
public const string ArrowGameResultUICtrl = "ArrowGameResultUICtrl";
|
||||
public const string RedeemCodeUICtrl = "RedeemCodeUICtrl";
|
||||
}
|
||||
}
|
||||
@@ -2028,7 +2028,7 @@ namespace RedHotRoast
|
||||
var start = fguiPosition;
|
||||
var end = GameHelper.GetUICenterPosition(ui.com_money.GetChild("text_gold"));
|
||||
float[] cash_array = GameHelper.GetRewardValue(0);
|
||||
var littleReward = GameHelper.GetExchangeRateVo().Multi * cash_array[0];
|
||||
var littleReward = Math.Round(GameHelper.GetExchangeRateVo().Multi * cash_array[0],2);
|
||||
Debug.Log($"小额奖励:{cash_array[0]} {littleReward}");
|
||||
|
||||
var rewardSingleData = new RewardSingleData(102, (decimal)littleReward, RewardOrigin.AdTask)
|
||||
|
||||
@@ -344,7 +344,7 @@ namespace RedHotRoast
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
|
||||
DOVirtual.DelayedCall(1, () =>
|
||||
{
|
||||
DOVirtual.Float(0, (float)DataMgr.Ticket.Value, 1,
|
||||
DOVirtual.Float(0, (float)DataMgr.Ticket.Value * GameHelper.GetExchangeRateVo().Multi, 1,
|
||||
value => { ui.top_money.GetChild("text_gold").text = ((decimal)value).ToString("0.00"); });
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
using DG.Tweening;
|
||||
using DontConfuse;
|
||||
using FGUI.ZM_H5_15;
|
||||
using RedHotRoast;
|
||||
@@ -36,10 +37,24 @@ namespace RedHotRoast
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.showBroadCast);
|
||||
WebviewManager.Instance.setInH5View(false);
|
||||
WebviewManager.Instance.ShowH5View(false);
|
||||
|
||||
HallManager.Instance.SetCameraVisible(true);
|
||||
|
||||
if (_config.normal)
|
||||
{
|
||||
WebviewManager.Instance.setInH5View(false);
|
||||
WebviewManager.Instance.ShowH5View(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
FreeWebViewManager.Instance.CloseWeb();
|
||||
}
|
||||
}
|
||||
|
||||
private SDKOpenConfig _config;
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
@@ -48,12 +63,26 @@ namespace RedHotRoast
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
if (args is not SDKOpenConfig openConfig) return;
|
||||
|
||||
_config = openConfig;
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
|
||||
|
||||
WebviewManager.Instance.setInH5View(true);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.hideBroadCast);
|
||||
// delayedCall = DOVirtual.DelayedCall(0.3f, () =>
|
||||
// {
|
||||
WebviewManager.Instance.ShowH5View(true);
|
||||
if (_config.normal)
|
||||
{
|
||||
WebviewManager.Instance.setInH5View(true);
|
||||
WebviewManager.Instance.ShowH5View(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
DOVirtual.DelayedCall(0.2f, () =>
|
||||
{
|
||||
FreeWebViewManager.Instance.OpenWeb(_config.url);
|
||||
});
|
||||
}
|
||||
|
||||
ui.btn_close.SetClick(() =>
|
||||
{
|
||||
|
||||
@@ -491,7 +491,7 @@ namespace RedHotRoast
|
||||
ui.btn_wv.visible = GameHelper.IsGiftSwitch();
|
||||
ui.btn_wv.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Open);
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Open);
|
||||
});
|
||||
|
||||
ui.btn_egg.SetClick(OnClickEgg);
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace RedHotRoast
|
||||
_mLastState = DataMgr.PettyState.Value;
|
||||
// Debug.Log($"PettyState============: {DataMgr.PettyState.Value}");
|
||||
var num = GameHelper.GetCommonModel().SmallReward;
|
||||
ui.com_get_panel.text_reward.text = $"{GameHelper.GetExchangeRateVo().Payicon}{GameHelper.Get102Str(num)}";
|
||||
ui.com_get_panel.text_reward.text = $"{GameHelper.Get102Str(num)}";
|
||||
|
||||
|
||||
ui.com_get_panel.btn_get.SetClick(GotoEnterAccount);
|
||||
@@ -252,12 +252,12 @@ namespace RedHotRoast
|
||||
var pettyAmount = DataMgr.PettyAmount.Value;
|
||||
if (pettyAmount != 0)
|
||||
{
|
||||
ui.com_detail.text_amount.SetVar("num", $" {GameHelper.GetExchangeRateVo().Payicon}{GameHelper.Get102Str(pettyAmount)}").FlushVars();
|
||||
ui.com_detail.text_amount.SetVar("num", $" {GameHelper.Get102Str(pettyAmount)}").FlushVars();
|
||||
}
|
||||
else
|
||||
{
|
||||
var num = GameHelper.GetCommonModel().SmallReward;
|
||||
ui.com_detail.text_amount.SetVar("num", $" {GameHelper.GetExchangeRateVo().Payicon}{GameHelper.Get102Str(num)}").FlushVars();
|
||||
ui.com_detail.text_amount.SetVar("num", $" {GameHelper.Get102Str(num)}").FlushVars();
|
||||
DataMgr.PettyAmount.Value = num;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d727ad32d6e44862ba3e6eff7fe909aa
|
||||
timeCreated: 1784016283
|
||||
@@ -0,0 +1,19 @@
|
||||
namespace RedHotRoast
|
||||
{
|
||||
public class RedeemCodeCtrl : BaseCtrl
|
||||
{
|
||||
public static RedeemCodeCtrl Instance { get; private set; }
|
||||
|
||||
private RedeemCodeModel model;
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a93167d1dab140d2917cf72e64e89770
|
||||
timeCreated: 1782269723
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace RedHotRoast
|
||||
{
|
||||
public class RedeemCodeModel : BaseModel
|
||||
{
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 20b6c254390a48eabb165d883f54bf67
|
||||
timeCreated: 1782269723
|
||||
@@ -0,0 +1,103 @@
|
||||
|
||||
using FGUI.tixian;
|
||||
using IgnoreOPS;
|
||||
|
||||
namespace RedHotRoast
|
||||
{
|
||||
public class RedeemCodeUI : BaseUI
|
||||
{
|
||||
private RedeemCodeUICtrl ctrl;
|
||||
private RedeemCodeModel model;
|
||||
private com_redeem_code ui;
|
||||
|
||||
public RedeemCodeUI(RedeemCodeUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.RedeemCodeUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "tixian";
|
||||
uiInfo.assetName = "com_redeem_code";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = true;
|
||||
uiInfo.isNeedCloseAnim = true;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as com_redeem_code;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
|
||||
|
||||
InitView();
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
private void InitView()
|
||||
{
|
||||
ui.lab_mn2.text = GameHelper.Get101Str(0);
|
||||
|
||||
ui.lab_ticket.text = GameHelper.GetPriceInt(DataMgr.PettyAmount.Value);
|
||||
|
||||
var strings = ConfigSystem.GetCommonConf().X_Redeemcode;
|
||||
ui.lab_code.text = strings;
|
||||
ui.text_rate.text = GameHelper.GetExchangeRateVo().Payicon + " 1";
|
||||
ui.btn_copy.SetClick(() =>
|
||||
{
|
||||
GameHelper.CopyText(ui.lab_code.text);
|
||||
});
|
||||
|
||||
ui.btn_contact_us.SetClick(() =>
|
||||
{
|
||||
SDKOpenConfig openConfig = new SDKOpenConfig
|
||||
{
|
||||
normal = false,
|
||||
url = ConfigSystem.GetCommonConf().X_ShopURL
|
||||
};
|
||||
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb, openConfig);
|
||||
CtrlCloseUI();
|
||||
});
|
||||
|
||||
ui.btn_close1.SetClick(CtrlCloseUI);
|
||||
|
||||
|
||||
}
|
||||
#region 消息
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02aaefad43c146b18cb726f31814007e
|
||||
timeCreated: 1782269723
|
||||
@@ -0,0 +1,71 @@
|
||||
namespace RedHotRoast
|
||||
{
|
||||
public class RedeemCodeUICtrl : BaseUICtrl
|
||||
{
|
||||
private RedeemCodeUI ui;
|
||||
private RedeemCodeModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.RedeemCodeUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.RedeemCodeUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.PettyAwardModel) as PettyAwardModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new RedeemCodeUI(this);
|
||||
ui.Open(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
if (ui != null && !ui.isClose)
|
||||
{
|
||||
ui.Close();
|
||||
}
|
||||
ui = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
public override uint GetOpenUIMsg(string uiName)
|
||||
{
|
||||
return openUIMsg;
|
||||
}
|
||||
public override uint GetCloseUIMsg(string uiName)
|
||||
{
|
||||
return closeUIMsg;
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: db2d94c85bfc42988faab968658f117e
|
||||
timeCreated: 1782269723
|
||||
@@ -109,6 +109,9 @@ namespace RedHotRoast
|
||||
ui.btn_watch.SetClick(WatchBtnClick);
|
||||
AdExchangeManager.Instance.SetWatchAd(AdExchangeManager.SavingPotMakeupAd, ui.btn_task_watch as btn_watchAd, () => { });
|
||||
AdExchangeManager.Instance.Start();
|
||||
|
||||
ui.text_rate1.text = GameHelper.GetExchangeRateVo().Payicon + " 1";
|
||||
ui.text_rate.text = GameHelper.GetExchangeRateVo().Payicon + " 1";
|
||||
|
||||
ad_cool_down = ConfigSystem.GetCommonConf().WwalaccelerationCD;
|
||||
HallManager.Instance.UpdateSecondEvent += updateSpeedCD;
|
||||
@@ -156,7 +159,8 @@ namespace RedHotRoast
|
||||
private void InitView()
|
||||
{
|
||||
Makeup_2 makeupVo = MakeupModel_2.GetData(makeupTaskData.tableId);
|
||||
ui.text_ad.text = string.Format(GameHelper.getDesByKey("saving_pot_5"), makeupVo.ADIncrease);
|
||||
ui.text_ad.text = string.Format(GameHelper.getDesByKey("saving_pot_5"),
|
||||
SaveingPotHelper.getChNumber(makeupVo.ADIncrease));
|
||||
string str = string.Format(GameHelper.getDesByKey("saving_pot_2"), makeupVo.PayIncrease);
|
||||
ui.text_pay.text = str;
|
||||
initTop();
|
||||
@@ -213,7 +217,7 @@ namespace RedHotRoast
|
||||
});
|
||||
|
||||
HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn;
|
||||
InitView();
|
||||
DOVirtual.DelayedCall(0.1f, InitView);
|
||||
}
|
||||
if (SaveData.GetSaveObject().saveingpot_ch > SaveData.GetSaveObject().last_saveingpot_ch)
|
||||
{
|
||||
@@ -344,7 +348,6 @@ namespace RedHotRoast
|
||||
btn_watchad.enabled = true;
|
||||
btn_watchad.can_buy.selectedIndex = 0;
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetCommonConf().PiggyBankSwitch == 1) btn_watchad.img_saveingpot.visible = true;
|
||||
|
||||
InitView();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace RedHotRoast
|
||||
btnSign.title = signList[index].id + "";
|
||||
|
||||
btnSign.touchable = false;
|
||||
btnSign.reward_num.text = GameHelper.Get101Str(signList[index].quantity[0]);
|
||||
btnSign.reward_num.text = GameHelper.IsGiftSwitch()?GameHelper.getChString(signList[index].quantity[0]):GameHelper.Get101Str(signList[index].quantity[0]);
|
||||
|
||||
var animName = "appear2";
|
||||
if (index % 5 == 4)
|
||||
|
||||
@@ -63,7 +63,9 @@ public class SaveingPotClass
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return $"{amount:N}";
|
||||
var exchangeRateVo = GameHelper.GetExchangeRateVo();
|
||||
var cash = exchangeRateVo.Multi * amount;
|
||||
return $"{cash:N}";
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -172,6 +174,8 @@ public class SaveingPotHelper
|
||||
}
|
||||
public static string getChNumber(float cash)
|
||||
{
|
||||
var exchangeRateVo = GameHelper.GetExchangeRateVo();
|
||||
cash = exchangeRateVo.Multi * cash;
|
||||
return $"{cash:N}";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user