fix:1、添加多语言的json文件,修复bug

This commit is contained in:
2026-07-13 11:09:10 +08:00
parent f1e05d9547
commit 6b2fb1b091
10 changed files with 1058 additions and 888 deletions
@@ -98,6 +98,7 @@ namespace RedHotRoast
public int[] inlineInitNum;
public int[] BalanceExchange;
public int[] PotExchange;
public int StatementSwitch;
}
}
+16 -10
View File
@@ -435,7 +435,7 @@ namespace RedHotRoast
/// <returns></returns>
public static string Get102Str(decimal currency)
{
var exchangeRateVO = GetExchangeRateVO();
var exchangeRateVO = GetExchangeRateVo();
decimal price = currency * (decimal)exchangeRateVO.Multi;
return $"{exchangeRateVO.Payicon}{price:N}";
}
@@ -457,7 +457,7 @@ namespace RedHotRoast
public static string getPrice(decimal ch)
{
var exchangeRateVO = GetExchangeRateVO();
var exchangeRateVO = GetExchangeRateVo();
decimal price = ch * (decimal)exchangeRateVO.Multi;
return $"{exchangeRateVO.Payicon}{price:N}";
}
@@ -465,11 +465,11 @@ namespace RedHotRoast
public static string ChooseCurrency()
{
var exchangeRateVO = GetExchangeRateVO();
var exchangeRateVO = GetExchangeRateVo();
return exchangeRateVO.Payicon;
}
public static ExchangeRate GetExchangeRateVO()
public static ExchangeRate GetExchangeRateVo()
{
var code = GetCurrCountry();
var voList = ConfigSystem.GetConfig<ExchangeRate>();
@@ -485,7 +485,7 @@ namespace RedHotRoast
public static float GetExchangeRateMulti()
{
return GetExchangeRateVO().Multi;
return GetExchangeRateVo().Multi;
}
public static string GetCurrCountry()
@@ -1235,6 +1235,12 @@ namespace RedHotRoast
if (ShowStatementViewCount > 0) return;
if (!IsGiftSwitch()) return;
if (ConfigSystem.GetCommonConf().StatementSwitch == 0)
{
HallManager.Instance.openTipsTimes++;
ShowStatementViewCount++;
return;
}
ShowStatementViewCount++;
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.StatementViewUI_Open);
}
@@ -1398,7 +1404,7 @@ namespace RedHotRoast
{
if (!IsConnect())
{
ShowTips("The network connection is abnormal.");
ShowTips("no_network", true);
}
return isCanCloseResultView;
@@ -1505,12 +1511,12 @@ namespace RedHotRoast
try
{
OpenBrowser.OpenURL(url);
GameHelper.ShowTips("try_send", true);
ShowTips("try_send", true);
}
catch (Exception ex)
{
Debug.LogError("打开邮箱失败:" + ex.Message);
GameHelper.ShowTips("send_failed", true);
// Debug.LogError("打开邮箱失败:" + ex.Message);
// GameHelper.ShowTips("send_failed", true);
}
}
@@ -1851,7 +1857,7 @@ namespace RedHotRoast
#else
Debug.LogWarning("当前平台不支持复制到剪贴板功能");
#endif
GameHelper.ShowTips("Copy Succeed");
ShowTips("copy_succeed", true);
}
public static string GetPriceInt(decimal ch)
File diff suppressed because it is too large Load Diff
+13 -12
View File
@@ -19,8 +19,10 @@ public class LoveLegendRoot : MonoBehaviour
OnLauncher();
TrackKit.TrackLoginFunnel(LoginFunnelEventType.Bootstrap);
#if !GAME_RELEASE
BuildGMTool();
NetGmTool.Instance.Init();
#endif
}
public static void OnLauncher()
@@ -90,18 +92,11 @@ public class LoveLegendRoot : MonoBehaviour
{
// ErrorLogKit.Send("error", "客户端日志上传", "GM工具点击测试",SuperApplication.Instance.attribution);
}));
GMTool.Instance.AddItem(new GMToolItem(GUIType.Button,
() => "广告ID信息打印",
s =>
{
// adInfoLabel += $"Max token: {MaxADKit.SDKKey} \n 激励广告Id: {MaxADKit.rewardedADUnitID} \n 插屏广告Id: {MaxADKit.interstitialADUnitID} \n";
}));
GMTool.Instance.AddItem(new GMToolItem(GUIType.Button, () => "关卡+1",
s =>
{
DataMgr.GameLevel.Value = DataMgr.GameLevel.Value + 1;
DataMgr.GameLevel.Value += 1;
}));
// 输入设置等级
GMTool.Instance.AddItem(new GMToolItem(
@@ -123,9 +118,6 @@ public class LoveLegendRoot : MonoBehaviour
}
}
));
GMTool.Instance.AddItem(new GMToolItem(GUIType.Label, () => $"{DataMgr.Ticket} 类型测试"));
// 来显示 adInfoLabel 的内容
GMTool.Instance.AddItem(new GMToolItem(GUIType.Label, () => adInfoLabel));
GMTool.Instance.AddItem(new GMToolItem(
GUIType.InputField,
() => "设置等级",
@@ -145,6 +137,15 @@ public class LoveLegendRoot : MonoBehaviour
}
}
));
GMTool.Instance.AddItem(new GMToolItem(GUIType.Button,
() => "打开 跳过广告",
s =>
{
adInfoLabel += "跳过广告开关, 已打开";
MaxADKit.IsOpenAd = true;
}));
GMTool.Instance.AddItem(new GMToolItem(GUIType.Label, () => $"{DataMgr.Ticket} 类型测试"));
// 来显示 adInfoLabel 的内容
GMTool.Instance.AddItem(new GMToolItem(GUIType.Label, () => adInfoLabel));
}
}
@@ -114,7 +114,7 @@ namespace RedHotRoast
uiInfo.layerType = UILayerType.Bottom;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
uiInfo.isNeedUIMask = false;
uiInfo.isTickUpdate = true;
}
@@ -385,8 +385,6 @@ namespace RedHotRoast
}
GameHelper.IsShowFirstReward();
// GameHelper.IsShowPettyReward();
GameHelper.ShowStatementView();
}
@@ -410,6 +408,7 @@ namespace RedHotRoast
{
decimal coin = DataMgr.Ticket.Value;
coin *= (decimal)GameHelper.GetExchangeRateVo().Multi;
if (ui.com_money is com_money comMoney) comMoney.text_gold.text = coin.ToString("0.00");
}
@@ -600,7 +599,8 @@ namespace RedHotRoast
{
if (ui.com_money is com_money btnMoney)
{
btnMoney.text_gold.text = DataMgr.Ticket.Value.ToString("0.00");
// btnMoney.text_gold.text = DataMgr.Ticket.Value.ToString("0.00");
Set102();
btnMoney.SetClick(PopMakeup);
}
}
@@ -608,6 +608,11 @@ namespace RedHotRoast
private void PopMakeup()
{
var makeupTaskData = DataMgr.MakeupTaskHistory.Value.Last();
Debug.Log($"makeupTaskData============{DataMgr.MakeupTaskHistory.Value.Count} {makeupTaskData.tableId}");
if (DataMgr.MakeupTaskHistory.Value.Count > 0 && makeupTaskData.tableId <= 0)
{
makeupTaskData.tableId = DataMgr.MakeupTaskHistory.Value.Count;
}
var vo = MakeupModel.GetData(makeupTaskData.tableId);
if (vo == null)
{
@@ -652,8 +657,24 @@ namespace RedHotRoast
ui.btn_petty.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.PettyAwardUI_Open); });
ui.btn_signin.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.SignInUI_Open); });
if (ConfigSystem.GetCommonConf().StatementSwitch == 1)
{
ui.btn_statement.SetClick(() =>
{
uiCtrlDispatcher.Dispatch(UICtrlMsg.StatementViewUI_Open);
});
}
else
{
HallManager.Instance.openTipsTimes++;
ui.btn_statement.visible = false;
}
ui.btn_statement.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.StatementViewUI_Open); });
ui.btn_saveingpot.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.SaveingPotUI_Open); });
@@ -1270,7 +1291,7 @@ namespace RedHotRoast
else if (type == 1)
{
_isDeleteMode = !_isDeleteMode;
GameHelper.ShowTips("You can delete any one of the arrows!");
GameHelper.ShowTips("delete_arrow", true);
}
}
@@ -1479,6 +1500,7 @@ namespace RedHotRoast
}
else
{
ReleaseArrowOccupied(clickArrow);
MoveToDisappear(clickArrow);
}
}
@@ -1863,7 +1885,7 @@ namespace RedHotRoast
if (CheckIsOutOfBounds(tailPos, arrow.finalMoveDir))
{
// ========== 以下销毁逻辑和原代码保持一致 ==========
ReleaseArrowOccupied(arrow);
// ReleaseArrowOccupied(arrow);
foreach (var line in arrow.lineUnits)
{
@@ -1971,8 +1993,7 @@ namespace RedHotRoast
/// 消除每条线时概率获得奖励
/// </summary>
private void DisappearLineGetReward()
{
{
if (!GameHelper.IsGiftSwitch()) return;
bool isGet = false;
@@ -2007,8 +2028,10 @@ namespace RedHotRoast
var start = fguiPosition;
var end = GameHelper.GetUICenterPosition(ui.com_money.GetChild("text_gold"));
float[] cash_array = GameHelper.GetRewardValue(0);
Debug.Log($"小额奖励:{cash_array[0]}");
var rewardSingleData = new RewardSingleData(102, (decimal)cash_array[0], RewardOrigin.AdTask)
var littleReward = GameHelper.GetExchangeRateVo().Multi * cash_array[0];
Debug.Log($"小额奖励:{cash_array[0]} {littleReward}");
var rewardSingleData = new RewardSingleData(102, (decimal)littleReward, RewardOrigin.AdTask)
{
startPosition = start,
endPosition = new Vector2(end.x - 135, end.y - 135)
@@ -117,9 +117,9 @@ namespace RedHotRoast
{
AwardNum = 20;
AwardRate = 2;
ui.btn_claim.title = "Claim(" + AwardNum + ")";
ui.btn_claim.title = Language.GetContentParams("exchange_succ", AwardNum);
}
else ui.btn_claim.title = "Claim(" + GameHelper.getChString((decimal)AwardNum) + ")";
else ui.btn_claim.title = Language.GetContentParams("exchange_succ", GameHelper.getChString((decimal)AwardNum));
if (IsWin)
{
if (PlayerPrefs.GetFloat("soundVolume", 1.0f) > 0f)
@@ -155,7 +155,7 @@ namespace RedHotRoast
((btn_claim)ui.com_arrow_end.btn_watchAd).state.selectedIndex = DataMgr.ArrowResultLevel.Value == 1 ? 1 : 0;
((btn_claim)ui.com_arrow_end.btn_watchAd).title = DataMgr.ArrowResultLevel.Value == 1 ? "Free Revive" : "Revive";
((btn_claim)ui.com_arrow_end.btn_watchAd).title = DataMgr.ArrowResultLevel.Value == 1 ? Language.GetContent("free_revive") : Language.GetContent("revive");
ui.com_arrow_end.btn_watchAd.SetClick(() =>
{
@@ -191,7 +191,7 @@ namespace RedHotRoast
});
ui.btn_mult.GetChild("title").text = "Claim X" + AwardRate;
ui.btn_mult.GetChild("title").text = Language.GetContentParams(" redeem_success", AwardRate);
if (SuccessDatas.IsH5Reward)
ui.com_ch.visible = false;
@@ -235,7 +235,7 @@ namespace RedHotRoast
}
}
ui.btn_gold.GetChild("text_gold").text = $"{DataMgr.Coin.Value:N0}";
ui.top_money.GetChild("text_gold").text = DataMgr.Ticket.Value.ToString();
ui.top_money.GetChild("text_gold").text = GameHelper.Get102Str(DataMgr.Ticket.Value);
ui.btn_mult.SetClick(() =>
{
if (!GameHelper.GetCloseResult())
@@ -311,7 +311,7 @@ namespace RedHotRoast
{
curr_type = 102;
end_ = GameHelper.GetUICenterPosition(ui.top_money, true);
awardNum *= GameHelper.GetExchangeRateVo().Multi;
}
var rewardSingleData = new RewardSingleData(curr_type, (decimal)awardNum, RewardOrigin.Play)
{
@@ -119,6 +119,9 @@ namespace RedHotRoast
ui.text_chdate3.text = GameHelper.getDesByKey("makeup_11");
// ui.text_rate1.text = GameHelper.GetExchangeRateVo().Payicon + " 1";
// ui.text_rate.text = GameHelper.GetExchangeRateVo().Payicon + " 1";
updateSpeedCD();
InitView();
initButtom();
@@ -198,8 +201,8 @@ namespace RedHotRoast
initTop();
ui.btn_close.SetClick(CtrlCloseUI);
if ((GameHelper.isRDExchangeMode() && DataMgr.ExchangeProcessMode.Value == 1) || (!GameHelper.isRDExchangeMode() && DataMgr.CHProcessMode.Value == 1))
{
if ((GameHelper.isRDExchangeMode() && DataMgr.ExchangeProcessMode.Value == 1) || (!GameHelper.isRDExchangeMode() && DataMgr.CHProcessMode.Value == 1))
{
if (makeupTaskData.status == MakeupTaskStatus.Level)
{
Debug.Log("00000000000000000003");
@@ -211,17 +214,17 @@ namespace RedHotRoast
ui.text_chneedlv.text = str;
ui.lab_lv_need_des.SetVar("num", ConfigSystem.GetCommonConf().ExpiryUnlock.ToString()).FlushVars();
Debug.Log(ConfigSystem.GetCommonConf().ExpiryUnlock);
str = string.Format("Owner ADs: {0}/{1}", makeupTaskData.LvVideoCount, ConfigSystem.GetCommonConf().ExpiryUnlock);
ui.lab_ads.text = str;
str = $"{makeupTaskData.LvVideoCount}/{ConfigSystem.GetCommonConf().ExpiryUnlock}";
ui.lab_ads.text = Language.GetContentParams("owner_ad", str);
ui.text_nowch.text = GameHelper.Get102Str(DataMgr.Ticket.Value);
ui.text_ch_title.text = "Level " + vo.levels_need;
ui.text_ch_title.text = Language.GetContentParams("need_lv_text", vo.levels_need);
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetCommonConf().PiggyBankSwitch == 1)
{
(ui.btn_watchad.GetChild("img_saveingpot") as GImage).visible = true;
}
if (GameHelper.GetLevel() <= vo.levels_need)
{
ui.btn_check_level.title = "Go";
ui.btn_check_level.title = Language.GetContentParams("go");
if (UIManager.Instance.IsExistUI(UIConst.RainPlayUI))
{
ui.btn_check_level.SetClick(() =>
@@ -315,10 +318,10 @@ namespace RedHotRoast
ui.text_chneedlv.text = str;
ui.lab_lv_need_des.SetVar("num", ConfigSystem.GetCommonConf().ExpiryUnlock.ToString()).FlushVars();
Debug.Log(ConfigSystem.GetCommonConf().ExpiryUnlock);
str = string.Format("Owner ADs: {0}/{1}", makeupTaskData.LvVideoCount, ConfigSystem.GetCommonConf().ExpiryUnlock);
ui.lab_ads.text = str;
str = $"{makeupTaskData.LvVideoCount}/{ ConfigSystem.GetCommonConf().ExpiryUnlock}";
ui.lab_ads.text = Language.GetContentParams("owner_ad", str);
ui.text_nowch.text = GameHelper.Get102Str(DataMgr.Ticket.Value);
ui.text_ch_title.text = "Level " + vo.levels_need;
ui.text_ch_title.text = Language.GetContentParams("need_lv_text", vo.levels_need);
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetCommonConf().PiggyBankSwitch == 1)
{
(ui.btn_watchad.GetChild("img_saveingpot") as GImage).visible = true;
@@ -326,7 +329,7 @@ namespace RedHotRoast
if (GameHelper.GetLevel() <= vo.levels_need)
{
ui.btn_check_level.title = "Go";
ui.btn_check_level.title = Language.GetContentParams("go");
if (UIManager.Instance.IsExistUI(UIConst.RainPlayUI))
{
ui.btn_check_level.SetClick(() =>
@@ -432,9 +435,9 @@ namespace RedHotRoast
now_selectindex = makeupTaskData.tableId - 1;
for (int i = 0; i < btn_list.Count; i++)
{
btn_list[i].text_level0.text = "Level " + makeup_list[i].levels_need;
btn_list[i].text_level1.text = "Level " + makeup_list[i].levels_need;
btn_list[i].text_level2.text = "Level " + makeup_list[i].levels_need;
btn_list[i].text_level0.text = Language.GetContentParams("need_lv_text", makeup_list[i].levels_need);
btn_list[i].text_level1.text = Language.GetContentParams("need_lv_text", makeup_list[i].levels_need);
btn_list[i].text_level2.text = Language.GetContentParams("need_lv_text", makeup_list[i].levels_need);
if (i < ch_index)
{
btn_list[i].img_check.visible = true;
@@ -459,7 +462,8 @@ namespace RedHotRoast
int _temp_index = i;
btn_list[i].SetClick(() =>
{
GameHelper.ShowTips("Complete level " + makeup_list[_temp_index].levels_need + " to unlock.");
var tips = Language.GetContentParams("Complete_tips", makeup_list[_temp_index].levels_need);
GameHelper.ShowTips(tips);
});
}
else
@@ -533,27 +537,27 @@ namespace RedHotRoast
var account = enter_input.text.Replace(" ", "");
if (account == null || account == "")
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
if (!GameHelper.CheckAccountValidly(account))
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
var fname = ui.com_fname.enter_fname.text.Replace(" ", "");
if (!GameHelper.CheckNameValidly(fname))
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
var lname = ui.com_lname.enter_lname.text.Replace(" ", "");
if (!GameHelper.CheckNameValidly(lname) && !AppConst.isPt())
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
@@ -985,7 +989,7 @@ namespace RedHotRoast
value += makeupTaskData.rdData[i].coupon_mount;
}
}
ui.lab_mn.text = GameHelper.Get101Str(vo.item_need - value);
ui.lab_mn.text = GameHelper.Get102Str(vo.item_need - value);
ui.list_kicket.itemRenderer = refreshItem;
ui.list_kicket.numItems = makeupTaskData.rdData.Count;
@@ -1000,12 +1004,12 @@ namespace RedHotRoast
if (makeupTaskData.rdData[index].isClaimed)
{
item.btn_claim.state.selectedIndex = 1;
item.btn_claim.title = "Claimed";
item.btn_claim.title = Language.GetContentParams("claimed");
}
else
{
item.btn_claim.state.selectedIndex = 0;
item.btn_claim.title = "Claim";
item.btn_claim.title = Language.GetContentParams("claim");
}
item.btn_claim.SetClick(() =>
@@ -1039,10 +1043,10 @@ namespace RedHotRoast
}
var vo = MakeupModel.GetData(makeupTaskData.tableId);
ui.lab_mn2.text = GameHelper.Get101Str(vo.item_need - value);
ui.lab_mn2.text = GameHelper.Get102Str(vo.item_need - value);
ui.lab_ticket.text = GameHelper.GetPriceInt(makeupTaskData.lastRdData.coupon_mount);
ui.lab_code.text = makeupTaskData.lastRdData.code;
ui.btn_back.SetClick(() =>
{
ui.cont_state.selectedIndex = 6;
@@ -1063,7 +1067,7 @@ namespace RedHotRoast
normal = false,
url = vo.T_ShopURL
};
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
CtrlCloseUI();
@@ -1207,7 +1211,7 @@ namespace RedHotRoast
btn_watchad.can_buy.selectedIndex = 1;
btn_watchad.btn_text.text = CommonHelper.TimeFormat(SaveData.GetSaveObject()._watch_ad_cd - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
HallManager.Instance.UpdateSecondEvent += upLvWatchAdsBtn;
// makeupTaskData.cash_time = GameHelper.GetNowTime() + ConfigSystem.GetCommonConf().BalanceExpired * 3600;
// makeupTaskData.cash_time = GameHelper.GetNowTime() + ConfigSystem.GetConfig<CommonModel>().BalanceExpired * 3600;
InitView();
}
});
@@ -39,7 +39,6 @@ namespace RedHotRoast
protected override void OnClose()
{
SaveData.SaveDataFunc();
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
@@ -90,8 +89,8 @@ namespace RedHotRoast
{
_mLastState = DataMgr.PettyState.Value;
// Debug.Log($"PettyState============: {DataMgr.PettyState.Value}");
var num = ConfigSystem.GetCommonConf().SmallReward;
ui.com_get_panel.text_reward.text = $"{GameHelper.Get102Str(num)} USD";
var num = GameHelper.GetCommonModel().SmallReward;
ui.com_get_panel.text_reward.text = $"{GameHelper.GetExchangeRateVo().Payicon}{GameHelper.Get102Str(num)}";
ui.com_get_panel.btn_get.SetClick(GotoEnterAccount);
@@ -179,27 +178,27 @@ namespace RedHotRoast
var account = ui.com_account.com_email.enter_email.text.Replace(" ", "");
if (account == "")
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
if (!GameHelper.CheckAccountValidly(account))
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
var fname = ui.com_account.com_first_name.enter_first_name.text.Replace(" ", "");
if (!GameHelper.CheckNameValidly(fname))
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
var lname = ui.com_account.com_last_name.enter_last_name.text.Replace(" ", "");
if (!GameHelper.CheckNameValidly(lname) && !AppConst.isPt())
{
GameHelper.ShowTips("Please enter the correct account information", true);
GameHelper.ShowTips("empty_account", true);
return;
}
@@ -238,7 +237,7 @@ namespace RedHotRoast
}
else
{
GameHelper.ShowTips("Failed to save information., please try again");
GameHelper.ShowTips("failed_save", true);
ui.com_second_confirm.btn_confirm.enabled = true;
}
});
@@ -253,13 +252,14 @@ namespace RedHotRoast
var pettyAmount = DataMgr.PettyAmount.Value;
if (pettyAmount != 0)
{
ui.com_detail.text_amount.SetVar("num", GameHelper.Get102Str(pettyAmount)).FlushVars();
ui.com_detail.text_amount.SetVar("num", $" {GameHelper.GetExchangeRateVo().Payicon}{GameHelper.Get102Str(pettyAmount)}").FlushVars();
}
else
{
var num = GameHelper.GetCommonModel().SmallReward;
ui.com_detail.text_amount.SetVar("num", GameHelper.Get102Str(num)).FlushVars();
ui.com_detail.text_amount.SetVar("num", $" {GameHelper.GetExchangeRateVo().Payicon}{GameHelper.Get102Str(num)}").FlushVars();
DataMgr.PettyAmount.Value = num;
}
var pettyDateTime = DataMgr.PettyDateTime.Value;
@@ -299,7 +299,7 @@ namespace RedHotRoast
}
else
{
var day = ConfigSystem.GetCommonConf().ProcessingTime;
var day = GameHelper.GetCommonModel().ProcessingTime;
ui.com_detail.text_limit.SetVar("day", day.ToString()).FlushVars();
DataMgr.PettyDataLimit.Value = day;
}
@@ -84,7 +84,7 @@ namespace RedHotRoast
}
// WebviewManager.ShezhiACT(false);
WebviewManager.Instance.SetDarkThough(false);
// WebviewManager.Instance.SetDarkThough(false);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Close);
@@ -163,7 +163,7 @@ namespace RedHotRoast
initTop();
ske_pot.SetActive(false);
string val = $"{SaveData.GetSaveObject().saveingpot_ch:N}";
string val = $"{SaveingPotHelper.getChNumber(SaveData.GetSaveObject().saveingpot_ch):N}";
ui.text_lose.SetVar("num", val).FlushVars();
// ui.text_lose.text = string.Format(ui.text_lose.text, SaveingPotHelper.getChString(SaveData.GetSaveObject().saveingpot_ch));
if (makeupTaskData.needShowAni)
@@ -173,10 +173,12 @@ namespace RedHotRoast
ui.text_chprogress.text = SaveingPotHelper.getChNumber(SaveData.GetSaveObject().saveingpot_ch) + "/" + SaveingPotHelper.getChNumber(makeupTaskData.amount);
ui.progress_ch.value = (SaveData.GetSaveObject().saveingpot_ch / makeupTaskData.amount) * 100;
ske_pot.SetActive(true);
Debug.Log("iiiiiiiiiiiiiiiiiiiii");
if (SaveData.GetSaveObject().saveingpot_ch < makeupTaskData.amount)
{
((btn_watchAd)ui.btn_ch).watch.text = "Go";
((btn_watchAd)ui.btn_ch).watch.text = Language.GetContentParams("go");
((btn_watchAd)ui.btn_ch).buy_state.selectedIndex = 0;
ui.btn_ch.SetClick(() => { });
ui.btn_ch.SetClick(() =>
{
GameHelper.ShowVideoAd("SaveingPotAd", isSuccess =>
@@ -190,25 +192,29 @@ namespace RedHotRoast
btnWatchad.enabled = false;
btnWatchad.can_buy.selectedIndex = 1;
btnWatchad.btn_text.text = CommonHelper.TimeFormat(SaveData.GetSaveObject()._watch_ad_cd - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
HallManager.Instance.UpdateSecondEvent += upLvWatchAdsBtn;
InitView();
HallManager.Instance.UpdateSecondEvent += upLvWatchAdsBtn;
}
});
});
}
else
{
btn_watchAd btnWatchad = ui.btn_ch as btn_watchAd;
btnWatchad.enabled = true;
btnWatchad.buy_state.selectedIndex = 1;
btnWatchad.title = "GET GIFT CARD";
btnWatchad.can_buy.selectedIndex = 0;
btnWatchad.title = Language.GetContentParams("get_card");
btnWatchad.SetClick(() => { });
btnWatchad.SetClick(() =>
{
makeupTaskData.needShowAni = false;
SaveData.SaveDataFunc();
InitView();
});
HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn;
DOVirtual.DelayedCall(0.1f, InitView);
}
if (SaveData.GetSaveObject().saveingpot_ch > SaveData.GetSaveObject().last_saveingpot_ch)
{
@@ -315,7 +321,6 @@ namespace RedHotRoast
ui.btn_watch.show_cd.selectedIndex = 0;
}
}
private void upLvWatchAdsBtn()
{
var lastAdTimes = SaveData.GetSaveObject()._watch_ad_cd;
@@ -341,6 +346,8 @@ 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();
}
}
@@ -378,7 +385,7 @@ namespace RedHotRoast
{
ui.cont_confirm.selectedIndex = 0;
ui.type.selectedIndex = 6;
ui.text_payhint.text = "You will get the " + makeupTaskData.amountStr + " for 90 days";
ui.text_payhint.text = Language.GetContentParams("saveingpot_get", makeupTaskData.amountStr);
ui.text_query.text = DataMgr.ExchangeAccount.Value;
ui.btn_confirm.SetClick(() =>
{
@@ -541,7 +548,7 @@ namespace RedHotRoast
}
}
ui.lab_mn.text = GameHelper.Get101Str(vo.item_need - value);
ui.lab_mn.text = GameHelper.Get102Str(vo.item_need - value);
ui.list_kicket.itemRenderer = refreshItem;
ui.list_kicket.numItems = makeupTaskData.rdData.Count;
@@ -555,12 +562,12 @@ namespace RedHotRoast
if (makeupTaskData.rdData[index].isClaimed)
{
item.btn_claim.state.selectedIndex = 1;
item.btn_claim.title = "Claimed";
item.btn_claim.title = Language.GetContentParams("claimed");
}
else
{
item.btn_claim.state.selectedIndex = 0;
item.btn_claim.title = "Claim";
item.btn_claim.title = Language.GetContentParams("claim");
}
item.btn_claim.SetClick(() =>
@@ -596,7 +603,7 @@ namespace RedHotRoast
}
var vo = MakeupModel_2.GetData(makeupTaskData.tableId);
ui.lab_mn2.text = GameHelper.Get101Str(vo.item_need - value);
ui.lab_mn2.text = GameHelper.Get102Str(vo.item_need - value);
ui.lab_ticket.text = GameHelper.GetPriceInt(makeupTaskData.lastRdData.coupon_mount);
ui.lab_code.text = makeupTaskData.lastRdData.code;
@@ -621,8 +628,8 @@ namespace RedHotRoast
normal = false,
url = vo.C_ShopURL
};
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
CtrlCloseUI();
@@ -735,12 +742,12 @@ namespace RedHotRoast
return;
}
ui.type.selectedIndex = 4;
ui.com_task.text_task.text = "get gift card";
ui.com_task.text_payer.text = "{amt=$0.5} directly to your gift card";
ui.com_task.text_task.text = Language.GetContentParams("get_card");
ui.com_task.text_payer.text = Language.GetContentParams("saveingpot_claimed",makeupTaskData.GetAmountStr());
ui.com_task.text_orderid.text = makeupTaskData.orderID;
ui.com_task.text_task_title.SetVar("ad", vo.ad_need.ToString()).FlushVars();
ui.com_task.text_ads.text = $"{makeupTaskData.videoCount}/{vo.ad_need}";
ui.com_task.text_payer.SetVar("amt", makeupTaskData.GetAmountStr()).FlushVars();
// ui.com_task.text_payer.text = makeupTaskData.GetAmountStr();
if (makeupTaskData.videoCount >= vo.ad_need)
{
@@ -837,27 +844,31 @@ namespace RedHotRoast
var account = enter_input.text.Replace(" ", "");
if (account == null || account == "")
{
GameHelper.ShowTips("Please enter the correct account information1", true);
string content = Language.GetContentParams("empty_account1", 1);
GameHelper.ShowTips(content);
return;
}
if (!GameHelper.CheckAccountValidly(account))
{
GameHelper.ShowTips("Please enter the correct account information2", true);
string content = Language.GetContentParams("empty_account1", 2);
GameHelper.ShowTips(content);
return;
}
var fname = ui.com_fname.enter_fname.text.Replace(" ", "");
if (!GameHelper.CheckNameValidly(fname))
{
GameHelper.ShowTips("Please enter the correct account information3", true);
string content = Language.GetContentParams("empty_account1", 3);
GameHelper.ShowTips(content);
return;
}
var lname = ui.com_lname.enter_lname.text.Replace(" ", "");
if (!GameHelper.CheckNameValidly(lname) && !AppConst.isPt())
{
GameHelper.ShowTips("Please enter the correct account information4", true);
string content = Language.GetContentParams("empty_account1", 4);
GameHelper.ShowTips(content);
return;
}
DataMgr.ExchangeAccount.Value= account;
@@ -921,8 +932,7 @@ namespace RedHotRoast
for (int i = 0; i < btn_list.Count; i++)
{
btn_list[i].text_ch.text = makeup_list[i].item_need + "";
Debug.Log(makeup_list[i].item_need);
btn_list[i].text_ch.text = makeup_list[i].item_need * GameHelper.GetExchangeRateVo().Multi + "";
btn_list[i].index.selectedIndex = i;
if (i >= saveingpot_history.Count)
{
@@ -949,7 +959,7 @@ namespace RedHotRoast
btn_list[i].img_outline.visible = false;
btn_list[i].SetClick(() =>
{
GameHelper.ShowTips("To be unlocked");
GameHelper.ShowTips("un_lock",true);
});
}
else
@@ -996,11 +1006,11 @@ namespace RedHotRoast
{
if (GameHelper.isRDExchangeMode())
{
text_list[i].text = "congratulations,[color=#ad4800][size=36] " + broad_list[i][0] + " [/size][/color]Successful exchange[color=#ad4800]<img src='ui://o9974uc5t9w7c3'/>" + broad_list[i][1] + "[/color]";
text_list[i].text = $"{Language.GetContent("congratulations")},[color=#ad4800][size=36] " + broad_list[i][0] + $" [/size][/color]{Language.GetContent("exchange_success")}[color=#ad4800]<img src='ui://o9974uc5t9w7c3'/>" + broad_list[i][1] + "[/color]";
}
else
{
text_list[i].text = "congratulations,[color=#ad4800][size=36] " + broad_list[i][0] + " [/size][/color]Successful exchange[color=#ad4800]$" + broad_list[i][1] + "[/color]";
text_list[i].text = $"{Language.GetContent("congratulations")},[color=#ad4800][size=36] " + broad_list[i][0] + $" [/size][/color]{Language.GetContent("exchange_success")}[color=#ad4800]$" + broad_list[i][1] + "[/color]";
}
}
});
@@ -1024,11 +1034,11 @@ namespace RedHotRoast
broad_list.Add(new string[2] { config_name_list[name_index], config_money_list[money_index] });
if (GameHelper.isRDExchangeMode())
{
text_list[i].text = "congratulations,[color=#ad4800][size=36] " + broad_list[i][0] + " [/size][/color]Successful exchange[color=#ad4800]<img src='ui://o9974uc5t9w7c3'/>" + broad_list[i][1] + "[/color]";
text_list[i].text = $"{Language.GetContent("congratulations")},[color=#ad4800][size=36] " + broad_list[i][0] + $" [/size][/color]{Language.GetContent("exchange_success")} [color=#ad4800]<img src='ui://o9974uc5t9w7c3'/>" + broad_list[i][1] + "[/color]";
}
else
{
text_list[i].text = "congratulations,[color=#ad4800][size=36] " + broad_list[i][0] + " [/size][/color]Successful exchange[color=#ad4800]$" + broad_list[i][1] + "[/color]";
text_list[i].text = $"{Language.GetContent("congratulations")},[color=#ad4800][size=36] " + broad_list[i][0] + $" [/size][/color]{Language.GetContent("exchange_success")}[color=#ad4800]$" + broad_list[i][1] + "[/color]";
}
}
}
+10
View File
@@ -9,6 +9,9 @@ namespace RedHotRoast
{
public class MaxADKit
{
public static bool IsOpenAd = false;
public static void Init()
{
@@ -76,6 +79,13 @@ namespace RedHotRoast
{
onVideoAdCompleted = onCompleted;
_placement = placement;
if (IsOpenAd)
{
onVideoAdCompleted?.Invoke(true);
return;
}
#if UNITY_EDITOR
onVideoAdCompleted?.Invoke(true);
#else