# Conflicts:
#	lua/app/common/pay_manager.lua
This commit is contained in:
xiekaidong 2023-06-05 15:36:07 +08:00
commit d08bc4b2b2
25 changed files with 198 additions and 225 deletions

View File

@ -206,6 +206,9 @@ local LocalizationGlobalConst =
BIND_ACCOUNT_FAILED = "BIND_ACCOUNT_FAILED", BIND_ACCOUNT_FAILED = "BIND_ACCOUNT_FAILED",
CHANGE_ACCOUNT_FAILED = "CHANGE_ACCOUNT_FAILED", CHANGE_ACCOUNT_FAILED = "CHANGE_ACCOUNT_FAILED",
SUMMON_SKIP = "SUMMON_SKIP", SUMMON_SKIP = "SUMMON_SKIP",
CHANGE_ACCOUNT_FAILED_2 = "CHANGE_ACCOUNT_FAILED_2",
MAIL_COUNTDOWN = "MAIL_COUNTDOWN",
SHOP_DESC_37 = "SHOP_DESC_37",
} }
return LocalizationGlobalConst return LocalizationGlobalConst

View File

@ -1,6 +1,13 @@
local mall_gold = { local mall_gold = {
[1]={ [1]={
["idel_time"]=24000, ["gold"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=400,
["num_for_nothing"]="Ughc"
},
["cost"]={ ["cost"]={
["type"]=1, ["type"]=1,
["type_for_nothing"]="Vw==", ["type_for_nothing"]="Vw==",
@ -12,7 +19,14 @@ local mall_gold = {
["daily"]=2 ["daily"]=2
}, },
[2]={ [2]={
["idel_time"]=180000, ["gold"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=4000,
["num_for_nothing"]="UghcAw=="
},
["cost"]={ ["cost"]={
["type"]=1, ["type"]=1,
["type_for_nothing"]="Vw==", ["type_for_nothing"]="Vw==",
@ -23,14 +37,21 @@ local mall_gold = {
} }
}, },
[3]={ [3]={
["idel_time"]=1800000, ["gold"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=40000,
["num_for_nothing"]="UghcA2U="
},
["cost"]={ ["cost"]={
["type"]=1, ["type"]=1,
["type_for_nothing"]="Vw==", ["type_for_nothing"]="Vw==",
["id"]=2, ["id"]=2,
["id_for_nothing"]="VA==", ["id_for_nothing"]="VA==",
["num"]=450, ["num"]=500,
["num_for_nothing"]="Ug1c" ["num_for_nothing"]="Uwhc"
} }
} }
} }

View File

@ -1258,7 +1258,7 @@ local skill = {
["name_act"]="skill01", ["name_act"]="skill01",
["fx_self"]=300009, ["fx_self"]=300009,
["bullet_time"]={ ["bullet_time"]={
933, 800,
3000, 3000,
400 400
} }
@ -1347,7 +1347,7 @@ local skill = {
["name_act"]="skill01", ["name_act"]="skill01",
["fx_self"]=300009, ["fx_self"]=300009,
["bullet_time"]={ ["bullet_time"]={
933, 800,
3000, 3000,
400 400
} }
@ -2663,25 +2663,19 @@ local skill = {
["effect"]={ ["effect"]={
{ {
["type"]="hurt_green", ["type"]="hurt_green",
["num"]=8000, ["num"]=10000,
["ratio"]=10000, ["ratio"]=10000,
["round"]=0 ["round"]=0
}, },
{ {
["type"]="hurt_green", ["type"]="hurt_green",
["num"]=8000, ["num"]=10000,
["ratio"]=10000, ["ratio"]=10000,
["round"]=0 ["round"]=0
}, },
{ {
["type"]="hurt_green", ["type"]="hurt_green",
["num"]=8000, ["num"]=13400,
["ratio"]=10000,
["round"]=0
},
{
["type"]="hurt_green",
["num"]=9400,
["ratio"]=10000, ["ratio"]=10000,
["round"]=0 ["round"]=0
} }
@ -2699,8 +2693,7 @@ local skill = {
["effect_block"]={ ["effect_block"]={
1, 1,
2, 2,
3, 3
4
}, },
["skill_position"]=1, ["skill_position"]=1,
["shake_time"]=200, ["shake_time"]=200,
@ -2760,25 +2753,19 @@ local skill = {
["effect"]={ ["effect"]={
{ {
["type"]="hurt_green", ["type"]="hurt_green",
["num"]=8000, ["num"]=10000,
["ratio"]=10000, ["ratio"]=10000,
["round"]=0 ["round"]=0
}, },
{ {
["type"]="hurt_green", ["type"]="hurt_green",
["num"]=8000, ["num"]=10000,
["ratio"]=10000, ["ratio"]=10000,
["round"]=0 ["round"]=0
}, },
{ {
["type"]="hurt_green", ["type"]="hurt_green",
["num"]=8000, ["num"]=13400,
["ratio"]=10000,
["round"]=0
},
{
["type"]="hurt_green",
["num"]=9400,
["ratio"]=10000, ["ratio"]=10000,
["round"]=0 ["round"]=0
}, },
@ -2802,8 +2789,7 @@ local skill = {
["effect_block"]={ ["effect_block"]={
1, 1,
2, 2,
3, 4
5
}, },
["skill_position"]=1, ["skill_position"]=1,
["shake_time"]=200, ["shake_time"]=200,
@ -2850,25 +2836,19 @@ local skill = {
["effect"]={ ["effect"]={
{ {
["type"]="hurt_green", ["type"]="hurt_green",
["num"]=8000, ["num"]=10000,
["ratio"]=10000, ["ratio"]=10000,
["round"]=0 ["round"]=0
}, },
{ {
["type"]="hurt_green", ["type"]="hurt_green",
["num"]=8000, ["num"]=10000,
["ratio"]=10000, ["ratio"]=10000,
["round"]=0 ["round"]=0
}, },
{ {
["type"]="hurt_green", ["type"]="hurt_green",
["num"]=8000, ["num"]=13400,
["ratio"]=10000,
["round"]=0
},
{
["type"]="hurt_green",
["num"]=9400,
["ratio"]=10000, ["ratio"]=10000,
["round"]=0 ["round"]=0
}, },
@ -2892,8 +2872,7 @@ local skill = {
["effect_block"]={ ["effect_block"]={
1, 1,
2, 2,
3, 4
5
}, },
["skill_position"]=1, ["skill_position"]=1,
["shake_time"]=200, ["shake_time"]=200,
@ -7123,19 +7102,13 @@ local skill = {
["effect"]={ ["effect"]={
{ {
["type"]="hurt", ["type"]="hurt",
["num"]=4000, ["num"]=6000,
["ratio"]=10000, ["ratio"]=10000,
["round"]=0 ["round"]=0
}, },
{ {
["type"]="hurt", ["type"]="hurt",
["num"]=4000, ["num"]=6000,
["ratio"]=10000,
["round"]=0
},
{
["type"]="hurt",
["num"]=4000,
["ratio"]=10000, ["ratio"]=10000,
["round"]=0 ["round"]=0
}, },
@ -7162,8 +7135,7 @@ local skill = {
["effect_block"]={ ["effect_block"]={
1, 1,
2, 2,
3, 5
6
}, },
["skill_position"]=1, ["skill_position"]=1,
["cd"]=3, ["cd"]=3,
@ -7173,8 +7145,7 @@ local skill = {
["sound_hit"]={ ["sound_hit"]={
2200120, 2200120,
1200114, 1200114,
1200113, 1200113
1200114
}, },
["name_act"]="skill01", ["name_act"]="skill01",
["fx_self"]=400039, ["fx_self"]=400039,

View File

@ -206,6 +206,9 @@ local localization_global =
["BIND_ACCOUNT_FAILED"] = "账号绑定失败,请重试", ["BIND_ACCOUNT_FAILED"] = "账号绑定失败,请重试",
["CHANGE_ACCOUNT_FAILED"] = "账号切换失败,请重试", ["CHANGE_ACCOUNT_FAILED"] = "账号切换失败,请重试",
["SUMMON_SKIP"] = "跳过", ["SUMMON_SKIP"] = "跳过",
["CHANGE_ACCOUNT_FAILED_2"] = "当前账号已是目标账号,无需切换",
["MAIL_COUNTDOWN"] = "{0}小时到期",
["SHOP_DESC_37"] = "宝箱奖励",
} }
return localization_global return localization_global

View File

@ -12,7 +12,7 @@ local item = {
["desc"]="It takes stamina to complete stages" ["desc"]="It takes stamina to complete stages"
}, },
[4]={ [4]={
["name"]="Outstanding Hero", ["name"]="Uncommon Hero",
["desc"]="Can obtain Uncommon Hero" ["desc"]="Can obtain Uncommon Hero"
}, },
[5]={ [5]={
@ -24,110 +24,135 @@ local item = {
["desc"]="Can obtain Epic Hero" ["desc"]="Can obtain Epic Hero"
}, },
[7]={ [7]={
["name"]="Pass Point",
["desc"]="Accumulated points can level up Pass." ["desc"]="Accumulated points can level up Pass."
}, },
[8]={ [8]={
["name"]="Wooden Box",
["desc"]="Can obtain heroes of the above qualities." ["desc"]="Can obtain heroes of the above qualities."
}, },
[9]={ [9]={
["name"]="Wooden Chest",
["desc"]="Can obtain heroes of the above qualities." ["desc"]="Can obtain heroes of the above qualities."
}, },
[10]={ [10]={
["name"]="Gold Chest",
["desc"]="Hero chests adorned with gold." ["desc"]="Hero chests adorned with gold."
}, },
[11]={ [11]={
["name"]="Platinum Chest",
["desc"]="Powerful heroes are inside." ["desc"]="Powerful heroes are inside."
}, },
[12]={ [12]={
["name"]="EXP",
["desc"]="Accumulate to a certain quantity for an upgrade." ["desc"]="Accumulate to a certain quantity for an upgrade."
}, },
[13]={ [13]={
["name"]="Common Key",
["desc"]="Used to open Normal Chest in the shop." ["desc"]="Used to open Normal Chest in the shop."
}, },
[14]={ [14]={
["name"]="Exquisite Key",
["desc"]="Used to open Exquisite Chest in the shop." ["desc"]="Used to open Exquisite Chest in the shop."
}, },
[15]={ [15]={
["name"]="Precious Key",
["desc"]="Used to open Precious Chest in the shop." ["desc"]="Used to open Precious Chest in the shop."
}, },
[16]={ [16]={
["name"]="Quest Chest",
["desc"]="Obtained by completing 5 daily quests." ["desc"]="Obtained by completing 5 daily quests."
}, },
[17]={ [17]={
["name"]="Ad Chest",
["desc"]="You can watch ads anywhere in the game to earn rewards." ["desc"]="You can watch ads anywhere in the game to earn rewards."
}, },
[18]={ [18]={
["name"]="Platinum Large Chest",
["desc"]="A huge Platinum Chest!" ["desc"]="A huge Platinum Chest!"
}, },
[19]={ [19]={
["name"]="Random Shard",
["desc"]="AFK rewards include random shards. The quantity and quality will increase with the progress of the stages." ["desc"]="AFK rewards include random shards. The quantity and quality will increase with the progress of the stages."
}, },
[12001]={ [12001]={
["name"]="Roxy Shard", ["name"]="Dancer Shard",
["desc"]="Dancer Shard, collect the shards to activate or upgrade." ["desc"]="Dancer Shard, collect the shards to activate or upgrade."
}, },
[13001]={ [13001]={
["name"]="Carla Shard", ["name"]="Claude Shard",
["desc"]="Claude Shard collect the shards to activate or upgrade." ["desc"]="Claude Shard collect the shards to activate or upgrade."
}, },
[13002]={ [13002]={
["name"]="Great Sword Robert Shard", ["name"]="Flare Shard",
["desc"]="Flare Shard, collect the shards to activate or upgrade." ["desc"]="Flare Shard, collect the shards to activate or upgrade."
}, },
[14001]={ [14001]={
["name"]="Aske Shard", ["name"]="Alexander Shard",
["desc"]="Alexander Shard, collect the shards to activate or upgrade." ["desc"]="Alexander Shard, collect the shards to activate or upgrade."
}, },
[22001]={ [22001]={
["name"]="Evelyn Shard", ["name"]="Blade Maid Shard",
["desc"]="Blade Maid Shard, collect the shards to activate or upgrade." ["desc"]="Blade Maid Shard, collect the shards to activate or upgrade."
}, },
[23001]={ [23001]={
["name"]="Lilith Shard", ["name"]="Barbarian Shard",
["desc"]="Barbarian Shard, collect the shards to activate or upgrade." ["desc"]="Barbarian Shard, collect the shards to activate or upgrade."
}, },
[23002]={ [23002]={
["name"]="White-Hair Catherine Shard", ["name"]="Er-Ya Shard",
["desc"]="Er-Ya Shard, collect the shards to activate or upgrade." ["desc"]="Er-Ya Shard, collect the shards to activate or upgrade."
}, },
[24001]={ [24001]={
["name"]="Allen Shard", ["name"]="Claymore Kid Shard",
["desc"]="Claymore Kid Shard, collect the shards to activate or upgrade." ["desc"]="Claymore Kid Shard, collect the shards to activate or upgrade."
}, },
[32001]={ [32001]={
["name"]="Onion Shard",
["desc"]="Onion Shard, collect the shards to activate or upgrade." ["desc"]="Onion Shard, collect the shards to activate or upgrade."
}, },
[33001]={ [33001]={
["name"]="Fawn Shard",
["desc"]="Fawn Shard, collect the shards to activate or upgrade." ["desc"]="Fawn Shard, collect the shards to activate or upgrade."
}, },
[33002]={ [33002]={
["name"]="Timberwolf Shard",
["desc"]="Timberwolf Shard, collect the shards to activate or upgrade." ["desc"]="Timberwolf Shard, collect the shards to activate or upgrade."
}, },
[34001]={ [34001]={
["name"]="Mulan Shard",
["desc"]="Mulan Shard, collect the shards to activate or upgrade." ["desc"]="Mulan Shard, collect the shards to activate or upgrade."
}, },
[42001]={ [42001]={
["name"]="Iceheart Shard",
["desc"]="Iceheart Shard, collect the shards to activate or upgrade." ["desc"]="Iceheart Shard, collect the shards to activate or upgrade."
}, },
[43001]={ [43001]={
["name"]="Ice Maiden Shard",
["desc"]="Ice Maiden Shard, collect the shards to activate or upgrade." ["desc"]="Ice Maiden Shard, collect the shards to activate or upgrade."
}, },
[43002]={ [43002]={
["name"]="Raven Shard",
["desc"]="Raven Shard, collect the shards to activate or upgrade." ["desc"]="Raven Shard, collect the shards to activate or upgrade."
}, },
[44001]={ [44001]={
["name"]="Frost Enchantress Shard",
["desc"]="Frost Enchantress Shard, collect the shards to activate or upgrade." ["desc"]="Frost Enchantress Shard, collect the shards to activate or upgrade."
}, },
[52001]={ [52001]={
["name"]="Ninja Lun Shard",
["desc"]="Ninja Lun Shard, collect the shards to activate or upgrade." ["desc"]="Ninja Lun Shard, collect the shards to activate or upgrade."
}, },
[53001]={ [53001]={
["name"]="Witch Kiki Shard",
["desc"]="Witch Kiki Shard, collect the shards to activate or upgrade." ["desc"]="Witch Kiki Shard, collect the shards to activate or upgrade."
}, },
[53002]={ [53002]={
["name"]="Soul Hunter Shard",
["desc"]="Soul Hunter Shard, collect the shards to activate or upgrade." ["desc"]="Soul Hunter Shard, collect the shards to activate or upgrade."
}, },
[54001]={ [54001]={
["name"]="Butterfly Shard",
["desc"]="Butterfly Shard, collect the shards to activate or upgrade." ["desc"]="Butterfly Shard, collect the shards to activate or upgrade."
} }
} }

View File

@ -12,112 +12,112 @@ local item = {
["desc"]="ステージクリアに必要なのは、当然スタミナだぜ。" ["desc"]="ステージクリアに必要なのは、当然スタミナだぜ。"
}, },
[4]={ [4]={
["name"]="Uncommon Hero"
}, },
[5]={ [5]={
["name"]="Rare Hero"
}, },
[6]={ [6]={
["name"]="Epic Hero"
}, },
[7]={ [7]={
["name"]="Pass Point"
}, },
[8]={ [8]={
["name"]="Wooden Box"
}, },
[9]={ [9]={
["name"]="Wooden Chest"
}, },
[10]={ [10]={
["name"]="Gold Chest"
}, },
[11]={ [11]={
["name"]="Platinum Chest"
}, },
[12]={ [12]={
["name"]="EXP"
}, },
[13]={ [13]={
["name"]="Common Key"
}, },
[14]={ [14]={
["name"]="Exquisite Key"
}, },
[15]={ [15]={
["name"]="Precious Key"
}, },
[16]={ [16]={
["name"]="Quest Chest"
}, },
[17]={ [17]={
["name"]="Ad Chest"
}, },
[18]={ [18]={
["name"]="Platinum Large Chest"
}, },
[19]={ [19]={
["name"]="Random Shard"
}, },
[12001]={ [12001]={
["name"]="Dancer Shard"
}, },
[13001]={ [13001]={
["name"]="Claude Shard"
}, },
[13002]={ [13002]={
["name"]="Flare Shard"
}, },
[14001]={ [14001]={
["name"]="Alexander Shard"
}, },
[22001]={ [22001]={
["name"]="Blade Maid Shard"
}, },
[23001]={ [23001]={
["name"]="Barbarian Shard"
}, },
[23002]={ [23002]={
["name"]="Er-Ya Shard"
}, },
[24001]={ [24001]={
["name"]="Claymore Kid Shard"
}, },
[32001]={ [32001]={
["name"]="Onion Shard"
}, },
[33001]={ [33001]={
["name"]="Fawn Shard"
}, },
[33002]={ [33002]={
["name"]="Timberwolf Shard"
}, },
[34001]={ [34001]={
["name"]="Mulan Shard"
}, },
[42001]={ [42001]={
["name"]="Iceheart Shard"
}, },
[43001]={ [43001]={
["name"]="Ice Maiden Shard"
}, },
[43002]={ [43002]={
["name"]="Raven Shard"
}, },
[44001]={ [44001]={
["name"]="Frost Enchantress Shard"
}, },
[52001]={ [52001]={
["name"]="Ninja Lun Shard"
}, },
[53001]={ [53001]={
["name"]="Witch Kiki Shard"
}, },
[53002]={ [53002]={
["name"]="Soul Hunter Shard"
}, },
[54001]={ [54001]={
["name"]="Butterfly Shard"
} }
} }
local config = { local config = {

View File

@ -553,7 +553,6 @@ local task = {
["num_for_nothing"]="Uwg=" ["num_for_nothing"]="Uwg="
} }
}, },
["lock"]=2,
["icon"]="7" ["icon"]="7"
}, },
[37]={ [37]={
@ -569,7 +568,6 @@ local task = {
["num_for_nothing"]="UQ0=" ["num_for_nothing"]="UQ0="
} }
}, },
["lock"]=2,
["icon"]="7" ["icon"]="7"
}, },
[38]={ [38]={
@ -585,7 +583,6 @@ local task = {
["num_for_nothing"]="Vwhc" ["num_for_nothing"]="Vwhc"
} }
}, },
["lock"]=2,
["icon"]="7" ["icon"]="7"
}, },
[39]={ [39]={
@ -601,7 +598,6 @@ local task = {
["num_for_nothing"]="Vw1c" ["num_for_nothing"]="Vw1c"
} }
}, },
["lock"]=2,
["icon"]="7" ["icon"]="7"
}, },
[40]={ [40]={
@ -617,7 +613,6 @@ local task = {
["num_for_nothing"]="Uwg=" ["num_for_nothing"]="Uwg="
} }
}, },
["lock"]=2,
["icon"]="7" ["icon"]="7"
}, },
[41]={ [41]={
@ -633,7 +628,6 @@ local task = {
["num_for_nothing"]="UQ0=" ["num_for_nothing"]="UQ0="
} }
}, },
["lock"]=2,
["icon"]="7" ["icon"]="7"
}, },
[42]={ [42]={
@ -649,7 +643,6 @@ local task = {
["num_for_nothing"]="Vwhc" ["num_for_nothing"]="Vwhc"
} }
}, },
["lock"]=2,
["icon"]="7" ["icon"]="7"
}, },
[43]={ [43]={
@ -665,7 +658,6 @@ local task = {
["num_for_nothing"]="Vw1c" ["num_for_nothing"]="Vw1c"
} }
}, },
["lock"]=2,
["icon"]="7" ["icon"]="7"
}, },
[44]={ [44]={
@ -1270,7 +1262,6 @@ local task = {
["num_for_nothing"]="Vw1c" ["num_for_nothing"]="Vw1c"
} }
}, },
["lock"]=2,
["icon"]="7" ["icon"]="7"
}, },
[84]={ [84]={
@ -1286,7 +1277,6 @@ local task = {
["num_for_nothing"]="Vw1c" ["num_for_nothing"]="Vw1c"
} }
}, },
["lock"]=2,
["icon"]="7" ["icon"]="7"
}, },
[85]={ [85]={

View File

@ -453,7 +453,7 @@ local tutorial = {
} }
}, },
[50000]={ [50000]={
["next_id"]=10, ["next_id"]=50010,
["type"]=2, ["type"]=2,
["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/left_btn", ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/left_btn",
["arrow_direction"]=2, ["arrow_direction"]=2,
@ -463,7 +463,6 @@ local tutorial = {
} }
}, },
[50010]={ [50010]={
["next_id"]=20,
["type"]=3, ["type"]=3,
["txt"]="tutorial_txt_6", ["txt"]="tutorial_txt_6",
["txt_offset"]={ ["txt_offset"]={

View File

@ -14,10 +14,13 @@ end
function GoldPigUI:onLoadRootComplete() function GoldPigUI:onLoadRootComplete()
local uiMap = self.root:genAllChildren() local uiMap = self.root:genAllChildren()
self.uiMap = uiMap
uiMap["gold_pig_ui.bg.close_btn"]:addClickListener(function() uiMap["gold_pig_ui.bg.close_btn"]:addClickListener(function()
self:closeUI() self:closeUI()
end) end)
self:initSpine()
uiMap["gold_pig_ui.bg.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.GOLD_PIG_TITLE)) uiMap["gold_pig_ui.bg.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.GOLD_PIG_TITLE))
uiMap["gold_pig_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.GOLD_PIG_DESC)) uiMap["gold_pig_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.GOLD_PIG_DESC))
@ -70,4 +73,13 @@ function GoldPigUI:onLoadRootComplete()
end) end)
end end
function GoldPigUI:initSpine()
self.titleSpine = self.uiMap["gold_pig_ui.bg.ui_spine_obj"]
local trackEntry = self.titleSpine:playAnim("open", false)
local time = self.titleSpine:getAnimation(trackEntry).Duration
self:performWithDelayGlobal(function()
self.titleSpine:playAnim("idle", true)
end, time)
end
return GoldPigUI return GoldPigUI

View File

@ -195,7 +195,7 @@ function BattleResultUI:tryShowGoldPig()
local currGemCount = DataManager.GoldPigData:getCount() local currGemCount = DataManager.GoldPigData:getCount()
local maxGemCount = DataManager.GoldPigData:getMaxCount() local maxGemCount = DataManager.GoldPigData:getMaxCount()
if lastGemCount > currGemCount then if lastGemCount > currGemCount then
lastGemCount = 0 lastGemCount = currGemCount
end end
self.goldPigGemTx:setText("+" .. currGemCount - lastGemCount) self.goldPigGemTx:setText("+" .. currGemCount - lastGemCount)
GFunc.centerImgAndTx(self.goldPigGemImg, self.goldPigGemTx, 0, -4) GFunc.centerImgAndTx(self.goldPigGemImg, self.goldPigGemTx, 0, -4)

View File

@ -9,8 +9,8 @@ function SideBarIdleCell:getIsOpen()
return DataManager.IdleData:getIsOpen() return DataManager.IdleData:getIsOpen()
end end
function SideBarIdleCell:getIconRes() function SideBarIdleCell:getSpineName()
return "main_btn_hang" return "ui_main_btn_hang"
end end
function SideBarIdleCell:onClick() function SideBarIdleCell:onClick()

View File

@ -9,8 +9,8 @@ function SideBarSevenDaysCell:getIsOpen()
return DataManager.SevenDayData:getIsOpen() return DataManager.SevenDayData:getIsOpen()
end end
function SideBarSevenDaysCell:getIconRes() function SideBarSevenDaysCell:getSpineName()
return "main_btn_sevenday" return "ui_main_btn_sevenday"
end end
function SideBarSevenDaysCell:onClick() function SideBarSevenDaysCell:onClick()

View File

@ -655,7 +655,7 @@ function MainCityUI:refreshTask()
self.taskBtn:setVisible(true) self.taskBtn:setVisible(true)
local showRedPoint = DataManager.DailyTaskData:getIsShowRedPoint() local showRedPoint = DataManager.DailyTaskData:getIsShowRedPoint()
if showRedPoint then if showRedPoint then
self.taskBtn:addRedPoint(42, 42, 0.8) self.taskBtn:addRedPoint(40, 40, 0.7)
else else
self.taskBtn:removeRedPoint() self.taskBtn:removeRedPoint()
end end
@ -812,13 +812,13 @@ function MainCityUI:refreshBottomRp()
local uiMap = self.root:genAllChildren() local uiMap = self.root:genAllChildren()
local heroRpObj = uiMap["main_ui.bottom_node.icons.ui_spine_obj_2.rp_node"] local heroRpObj = uiMap["main_ui.bottom_node.icons.ui_spine_obj_2.rp_node"]
if DataManager.HeroData:getRp() then if DataManager.HeroData:getRp() then
heroRpObj:addRedPoint(0, 0, 1) heroRpObj:addRedPoint(0, 0, 0.7)
else else
heroRpObj:removeRedPoint() heroRpObj:removeRedPoint()
end end
local shopRpObj = uiMap["main_ui.bottom_node.icons.ui_spine_obj_3.rp_node"] local shopRpObj = uiMap["main_ui.bottom_node.icons.ui_spine_obj_3.rp_node"]
if DataManager.ShopData:getRp() then if DataManager.ShopData:getRp() then
shopRpObj:addRedPoint(0, 0, 1) shopRpObj:addRedPoint(0, 0, 0.7)
else else
shopRpObj:removeRedPoint() shopRpObj:removeRedPoint()
end end

View File

@ -1,7 +1,7 @@
local BoxLevelUI = class("BoxLevelUI", BaseUI) local BoxLevelUI = class("BoxLevelUI", BaseUI)
local BASE_CELL_HEIGHT = 200 local BOX_3_CELL_HEIGHT = 260
local BG_WITHOUT_3_BOX_HEIGHT = 638 local BG_WITHOUT_3_BOX_HEIGHT = 660
function BoxLevelUI:ctor(params) function BoxLevelUI:ctor(params)
params = params or {} params = params or {}
@ -24,11 +24,13 @@ function BoxLevelUI:onLoadRootComplete()
self.bg = self.uiMap["box_level_ui.bg"] self.bg = self.uiMap["box_level_ui.bg"]
self.titleTx = self.uiMap["box_level_ui.bg.title_img.title"] self.titleTx = self.uiMap["box_level_ui.bg.title_img.title"]
self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_37))
self.lvTx = self.uiMap["box_level_ui.bg.lv_node.lv_bg.text"] self.lvTx = self.uiMap["box_level_ui.bg.lv_node.lv_bg.text"]
self.leftArrow = self.uiMap["box_level_ui.bg.lv_node.left_arrow"] self.leftArrow = self.uiMap["box_level_ui.bg.lv_node.left_arrow"]
self.rightArrow = self.uiMap["box_level_ui.bg.lv_node.right_arrow"] self.rightArrow = self.uiMap["box_level_ui.bg.lv_node.right_arrow"]
self.box1Node = self.uiMap["box_level_ui.bg.box_1"] self.box1Node = self.uiMap["box_level_ui.bg.box_1"]
self.box1AddBg = self.uiMap["box_level_ui.bg.box_1.bg_img"]
self.box1Add1Node = self.uiMap["box_level_ui.bg.box_1.add_node_1"] self.box1Add1Node = self.uiMap["box_level_ui.bg.box_1.add_node_1"]
self.box1Add1ItemCell = CellManager:addCellComp(self.uiMap["box_level_ui.bg.box_1.add_node_1.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) self.box1Add1ItemCell = CellManager:addCellComp(self.uiMap["box_level_ui.bg.box_1.add_node_1.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL)
self.box1Add1Text = self.uiMap["box_level_ui.bg.box_1.add_node_1.text"] self.box1Add1Text = self.uiMap["box_level_ui.bg.box_1.add_node_1.text"]
@ -39,6 +41,7 @@ function BoxLevelUI:onLoadRootComplete()
self.box1Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 self.box1Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成
self.box2Node = self.uiMap["box_level_ui.bg.box_2"] self.box2Node = self.uiMap["box_level_ui.bg.box_2"]
self.box2AddBg = self.uiMap["box_level_ui.bg.box_2.bg_img"]
self.box2Add1Node = self.uiMap["box_level_ui.bg.box_2.add_node_1"] self.box2Add1Node = self.uiMap["box_level_ui.bg.box_2.add_node_1"]
self.box2Add1ItemCell = CellManager:addCellComp(self.uiMap["box_level_ui.bg.box_2.add_node_1.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) self.box2Add1ItemCell = CellManager:addCellComp(self.uiMap["box_level_ui.bg.box_2.add_node_1.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL)
self.box2Add1Text = self.uiMap["box_level_ui.bg.box_2.add_node_1.text"] self.box2Add1Text = self.uiMap["box_level_ui.bg.box_2.add_node_1.text"]
@ -99,14 +102,16 @@ function BoxLevelUI:refresh()
self.bg:setSizeDeltaY(BG_WITHOUT_3_BOX_HEIGHT) self.bg:setSizeDeltaY(BG_WITHOUT_3_BOX_HEIGHT)
else else
self.box3Node:setVisible(true) self.box3Node:setVisible(true)
self.bg:setSizeDeltaY(BG_WITHOUT_3_BOX_HEIGHT + BASE_CELL_HEIGHT) self.bg:setSizeDeltaY(BG_WITHOUT_3_BOX_HEIGHT + BOX_3_CELL_HEIGHT)
end end
if self.level == 1 then if self.level == 1 then
self.box1AddBg:setVisible(false)
self.box1Add1Node:setVisible(false) self.box1Add1Node:setVisible(false)
self.box1Add2Node:setVisible(false) self.box1Add2Node:setVisible(false)
self.box1Desc:setVisible(true) self.box1Desc:setVisible(true)
self.box2AddBg:setVisible(false)
self.box2Add1Node:setVisible(false) self.box2Add1Node:setVisible(false)
self.box2Add2Node:setVisible(false) self.box2Add2Node:setVisible(false)
self.box2Desc:setVisible(true) self.box2Desc:setVisible(true)
@ -115,10 +120,12 @@ function BoxLevelUI:refresh()
self.box3Add2Node:setVisible(false) self.box3Add2Node:setVisible(false)
self.box3Desc:setVisible(true) self.box3Desc:setVisible(true)
else else
self.box1AddBg:setVisible(false)
self.box1Add1Node:setVisible(false) self.box1Add1Node:setVisible(false)
self.box1Add2Node:setVisible(false) self.box1Add2Node:setVisible(false)
self.box1Desc:setVisible(false) self.box1Desc:setVisible(false)
self.box2AddBg:setVisible(false)
self.box2Add1Node:setVisible(false) self.box2Add1Node:setVisible(false)
self.box2Add2Node:setVisible(false) self.box2Add2Node:setVisible(false)
self.box2Desc:setVisible(false) self.box2Desc:setVisible(false)
@ -133,6 +140,7 @@ function BoxLevelUI:refresh()
local count = #reward1 local count = #reward1
if count == 1 then if count == 1 then
self.box1AddBg:setVisible(true)
self.box1Add1Node:setVisible(true) self.box1Add1Node:setVisible(true)
self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0) self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0)
self.box1Add1ItemCell:setNum("") self.box1Add1ItemCell:setNum("")
@ -141,6 +149,7 @@ function BoxLevelUI:refresh()
end) end)
self.box1Add1Text:setText("+" .. tostring(reward1[1].num)) self.box1Add1Text:setText("+" .. tostring(reward1[1].num))
else else
self.box1AddBg:setVisible(true)
self.box1Add1Node:setVisible(true) self.box1Add1Node:setVisible(true)
self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0) self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0)
self.box1Add1ItemCell:setNum("") self.box1Add1ItemCell:setNum("")
@ -160,6 +169,7 @@ function BoxLevelUI:refresh()
local count = #reward2 local count = #reward2
if count == 1 then if count == 1 then
self.box2AddBg:setVisible(true)
self.box2Add1Node:setVisible(true) self.box2Add1Node:setVisible(true)
self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0) self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0)
self.box2Add1ItemCell:setNum("") self.box2Add1ItemCell:setNum("")
@ -168,6 +178,7 @@ function BoxLevelUI:refresh()
end) end)
self.box2Add1Text:setText("+" .. tostring(reward2[1].num)) self.box2Add1Text:setText("+" .. tostring(reward2[1].num))
else else
self.box2AddBg:setVisible(true)
self.box2Add1Node:setVisible(true) self.box2Add1Node:setVisible(true)
self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0) self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0)
self.box2Add1ItemCell:setNum("") self.box2Add1ItemCell:setNum("")

View File

@ -23,6 +23,7 @@ function BoxLevelUpUI:onLoadRootComplete()
self.lvTx = self.uiMap["box_level_up_ui.lv_up.text"] self.lvTx = self.uiMap["box_level_up_ui.lv_up.text"]
self.box1Node = self.uiMap["box_level_up_ui.box_1"] self.box1Node = self.uiMap["box_level_up_ui.box_1"]
self.box1AddBg = self.uiMap["box_level_up_ui.box_1.bg_img"]
self.box1Add1Node = self.uiMap["box_level_up_ui.box_1.add_node_1"] self.box1Add1Node = self.uiMap["box_level_up_ui.box_1.add_node_1"]
self.box1Add1ItemCell = CellManager:addCellComp(self.uiMap["box_level_up_ui.box_1.add_node_1.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) self.box1Add1ItemCell = CellManager:addCellComp(self.uiMap["box_level_up_ui.box_1.add_node_1.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL)
self.box1Add1Text = self.uiMap["box_level_up_ui.box_1.add_node_1.text"] self.box1Add1Text = self.uiMap["box_level_up_ui.box_1.add_node_1.text"]
@ -33,6 +34,7 @@ function BoxLevelUpUI:onLoadRootComplete()
self.box1Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 self.box1Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成
self.box2Node = self.uiMap["box_level_up_ui.box_2"] self.box2Node = self.uiMap["box_level_up_ui.box_2"]
self.box2AddBg = self.uiMap["box_level_up_ui.box_2.bg_img"]
self.box2Add1Node = self.uiMap["box_level_up_ui.box_2.add_node_1"] self.box2Add1Node = self.uiMap["box_level_up_ui.box_2.add_node_1"]
self.box2Add1ItemCell = CellManager:addCellComp(self.uiMap["box_level_up_ui.box_2.add_node_1.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) self.box2Add1ItemCell = CellManager:addCellComp(self.uiMap["box_level_up_ui.box_2.add_node_1.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL)
self.box2Add1Text = self.uiMap["box_level_up_ui.box_2.add_node_1.text"] self.box2Add1Text = self.uiMap["box_level_up_ui.box_2.add_node_1.text"]
@ -62,10 +64,12 @@ function BoxLevelUpUI:refresh()
self.lvTx:setText("Lv." .. tostring(self.level)) self.lvTx:setText("Lv." .. tostring(self.level))
self.closeTx:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_TO_CONTINUE)) -- 点击继续 self.closeTx:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_TO_CONTINUE)) -- 点击继续
self.box1AddBg:setVisible(false)
self.box1Add1Node:setVisible(false) self.box1Add1Node:setVisible(false)
self.box1Add2Node:setVisible(false) self.box1Add2Node:setVisible(false)
self.box1Desc:setVisible(false) self.box1Desc:setVisible(false)
self.box2AddBg:setVisible(false)
self.box2Add1Node:setVisible(false) self.box2Add1Node:setVisible(false)
self.box2Add2Node:setVisible(false) self.box2Add2Node:setVisible(false)
self.box2Desc:setVisible(false) self.box2Desc:setVisible(false)
@ -80,6 +84,7 @@ function BoxLevelUpUI:refresh()
local count = #reward1 local count = #reward1
if count == 1 then if count == 1 then
self.box1AddBg:setVisible(true)
self.box1Add1Node:setVisible(true) self.box1Add1Node:setVisible(true)
self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0) self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0)
self.box1Add1ItemCell:setNum("") self.box1Add1ItemCell:setNum("")
@ -88,6 +93,7 @@ function BoxLevelUpUI:refresh()
end) end)
self.box1Add1Text:setText("+" .. tostring(reward1[1].num)) self.box1Add1Text:setText("+" .. tostring(reward1[1].num))
else else
self.box1AddBg:setVisible(true)
self.box1Add1Node:setVisible(true) self.box1Add1Node:setVisible(true)
self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0) self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0)
self.box1Add1ItemCell:setNum("") self.box1Add1ItemCell:setNum("")
@ -107,6 +113,7 @@ function BoxLevelUpUI:refresh()
local count = #reward2 local count = #reward2
if count == 1 then if count == 1 then
self.box2AddBg:setVisible(true)
self.box2Add1Node:setVisible(true) self.box2Add1Node:setVisible(true)
self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0) self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0)
self.box2Add1ItemCell:setNum("") self.box2Add1ItemCell:setNum("")
@ -115,6 +122,7 @@ function BoxLevelUpUI:refresh()
end) end)
self.box2Add1Text:setText("+" .. tostring(reward2[1].num)) self.box2Add1Text:setText("+" .. tostring(reward2[1].num))
else else
self.box2AddBg:setVisible(true)
self.box2Add1Node:setVisible(true) self.box2Add1Node:setVisible(true)
self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0) self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0)
self.box2Add1ItemCell:setNum("") self.box2Add1ItemCell:setNum("")

View File

@ -50,10 +50,6 @@ function BoxRewardUI:ctor(params)
for id, count in pairs(fragmentMap) do for id, count in pairs(fragmentMap) do
table.insert(self.fragmentRewards, {id = id, count = count}) table.insert(self.fragmentRewards, {id = id, count = count})
end end
for i = 1, 10 do
table.insert(self.fragmentRewards, {id = 12001, count = 100})
end
end end
function BoxRewardUI:isFullScreen() function BoxRewardUI:isFullScreen()

View File

@ -5,6 +5,7 @@ local BASE_CELL_HEIGHT = 320
function BeginnerSellCell:init() function BeginnerSellCell:init()
local uiMap = self.baseObject:genAllChildren() local uiMap = self.baseObject:genAllChildren()
self.bg = uiMap["gift_cell.bg"] self.bg = uiMap["gift_cell.bg"]
self.bg:setTexture("assets/arts/textures/background/shop/shop_gift_banner_3.png")
self.leftArrow = uiMap["gift_cell.left_arrow"] self.leftArrow = uiMap["gift_cell.left_arrow"]
self.rightArrow = uiMap["gift_cell.right_arrow"] self.rightArrow = uiMap["gift_cell.right_arrow"]
@ -26,13 +27,7 @@ function BeginnerSellCell:init()
end end
-- 不限时时使用1类型 否则使用2类型 -- 不限时时使用1类型 否则使用2类型
self.originPriceImg1 = uiMap["gift_cell.bg.origin_price_1"] self.priceText = uiMap["gift_cell.bg.price"]
self.originPriceText1 = uiMap["gift_cell.bg.origin_price_1.text"]
self.priceText1 = uiMap["gift_cell.bg.price_1"]
self.originPriceImg2 = uiMap["gift_cell.bg.origin_price_2"]
self.originPriceText2 = uiMap["gift_cell.bg.origin_price_2.text"]
self.priceText2 = uiMap["gift_cell.bg.price_2"]
self.timeImg = uiMap["gift_cell.bg.time_img"] self.timeImg = uiMap["gift_cell.bg.time_img"]
self.timeText = uiMap["gift_cell.bg.time_img.text"] self.timeText = uiMap["gift_cell.bg.time_img.text"]
@ -66,16 +61,8 @@ function BeginnerSellCell:refresh()
end end
end end
self.reweardLayout:RefreshLayout() self.reweardLayout:RefreshLayout()
-- 价格(使用1类型,且不显示原价) -- 价格
self.originPriceImg1:setVisible(false) self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id))
self.originPriceText1:setVisible(false)
self.priceText1:setVisible(true)
self.originPriceImg2:setVisible(false)
self.originPriceText2:setVisible(false)
self.priceText2:setVisible(false)
self.priceText1:setText(GFunc.getFormatPrice(cfgInfo.recharge_id))
-- 限时(隐藏) -- 限时(隐藏)
self.timeImg:setVisible(false) self.timeImg:setVisible(false)

View File

@ -6,6 +6,7 @@ local MAX_REWARD_COUNT = 4
function ChapterCell:init() function ChapterCell:init()
local uiMap = self.baseObject:genAllChildren() local uiMap = self.baseObject:genAllChildren()
self.bg = uiMap["gift_cell.bg"] self.bg = uiMap["gift_cell.bg"]
self.bg:setTexture("assets/arts/textures/background/shop/shop_gift_banner_2.png")
self.leftArrow = uiMap["gift_cell.left_arrow"] self.leftArrow = uiMap["gift_cell.left_arrow"]
self.rightArrow = uiMap["gift_cell.right_arrow"] self.rightArrow = uiMap["gift_cell.right_arrow"]
@ -27,13 +28,7 @@ function ChapterCell:init()
end end
-- 不限时时使用1类型 否则使用2类型 -- 不限时时使用1类型 否则使用2类型
self.originPriceImg1 = uiMap["gift_cell.bg.origin_price_1"] self.priceText = uiMap["gift_cell.bg.price"]
self.originPriceText1 = uiMap["gift_cell.bg.origin_price_1.text"]
self.priceText1 = uiMap["gift_cell.bg.price_1"]
self.originPriceImg2 = uiMap["gift_cell.bg.origin_price_2"]
self.originPriceText2 = uiMap["gift_cell.bg.origin_price_2.text"]
self.priceText2 = uiMap["gift_cell.bg.price_2"]
self.timeImg = uiMap["gift_cell.bg.time_img"] self.timeImg = uiMap["gift_cell.bg.time_img"]
self.timeText = uiMap["gift_cell.bg.time_img.text"] self.timeText = uiMap["gift_cell.bg.time_img.text"]
@ -82,17 +77,8 @@ function ChapterCell:refresh(idx, cfgInfo, totalCount, arrowCallback)
end end
end end
self.reweardLayout:RefreshLayout() self.reweardLayout:RefreshLayout()
-- 价格(使用1类型)(取消原价) -- 价格
self.originPriceImg1:setVisible(false) self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id))
self.originPriceText1:setVisible(false)
self.priceText1:setVisible(true)
self.originPriceImg2:setVisible(false)
self.originPriceText2:setVisible(false)
self.priceText2:setVisible(false)
self.originPriceText1:setText(GFunc.getFormatPrice(cfgInfo.original))
self.priceText1:setText(GFunc.getFormatPrice(cfgInfo.recharge_id))
-- 限时(隐藏) -- 限时(隐藏)
self.timeImg:setVisible(false) self.timeImg:setVisible(false)

View File

@ -5,6 +5,7 @@ local BASE_CELL_HEIGHT = 320
function CoinSellCell:init() function CoinSellCell:init()
local uiMap = self.baseObject:genAllChildren() local uiMap = self.baseObject:genAllChildren()
self.bg = uiMap["gift_cell.bg"] self.bg = uiMap["gift_cell.bg"]
self.bg:setTexture("assets/arts/textures/background/shop/shop_gift_banner_6.png")
self.leftArrow = uiMap["gift_cell.left_arrow"] self.leftArrow = uiMap["gift_cell.left_arrow"]
self.rightArrow = uiMap["gift_cell.right_arrow"] self.rightArrow = uiMap["gift_cell.right_arrow"]
@ -24,15 +25,7 @@ function CoinSellCell:init()
self.rewardCellList[i] = CellManager:addCellComp(uiMap["gift_cell.bg.reward_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL) self.rewardCellList[i] = CellManager:addCellComp(uiMap["gift_cell.bg.reward_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
end end
end end
self.priceText = uiMap["gift_cell.bg.price"]
-- 不限时时使用1类型 否则使用2类型
self.originPriceImg1 = uiMap["gift_cell.bg.origin_price_1"]
self.originPriceText1 = uiMap["gift_cell.bg.origin_price_1.text"]
self.priceText1 = uiMap["gift_cell.bg.price_1"]
self.originPriceImg2 = uiMap["gift_cell.bg.origin_price_2"]
self.originPriceText2 = uiMap["gift_cell.bg.origin_price_2.text"]
self.priceText2 = uiMap["gift_cell.bg.price_2"]
self.timeImg = uiMap["gift_cell.bg.time_img"] self.timeImg = uiMap["gift_cell.bg.time_img"]
self.timeText = uiMap["gift_cell.bg.time_img.text"] self.timeText = uiMap["gift_cell.bg.time_img.text"]
@ -63,16 +56,8 @@ function CoinSellCell:refresh()
end end
end end
self.reweardLayout:RefreshLayout() self.reweardLayout:RefreshLayout()
-- 价格(使用2类型,且不显示原价) -- 价格
self.originPriceImg1:setVisible(false) self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id))
self.originPriceText1:setVisible(false)
self.priceText1:setVisible(false)
self.originPriceImg2:setVisible(false)
self.originPriceText2:setVisible(false)
self.priceText2:setVisible(true)
self.priceText2:setText(GFunc.getFormatPrice(cfgInfo.recharge_id))
-- 限时 -- 限时
self.timeImg:setVisible(true) self.timeImg:setVisible(true)
self:refreshTime() self:refreshTime()
@ -114,7 +99,7 @@ function CoinSellCell:refreshTime()
remainTime = 0 remainTime = 0
end end
end end
self.timeText:setText(Time:formatNumTimeStr(remainTime)) self.timeText:setText(Time:formatNumTime(remainTime))
end end
function CoinSellCell:getCellCount() function CoinSellCell:getCellCount()

View File

@ -21,7 +21,7 @@ function GoldCell:refresh(id, cfgInfo)
local idleTime = cfgInfo.idel_time local idleTime = cfgInfo.idel_time
local cost = cfgInfo.cost local cost = cfgInfo.cost
local adMaxTimes = cfgInfo.daily or 0 local adMaxTimes = cfgInfo.daily or 0
local goldNum = DataManager.ShopData:getCommonDailyCoinNum(idleTime) local goldNum = DataManager.ShopData:getCommonDailyCoinNum(id)
self.icon:setSprite(GConst.ATLAS_PATH.SHOP, GConst.ShopConst.COIN_ICON_NAME[id]) self.icon:setSprite(GConst.ATLAS_PATH.SHOP, GConst.ShopConst.COIN_ICON_NAME[id])

View File

@ -4,6 +4,7 @@ local MAX_REWARD_COUNT = 4
function GrowCell:init() function GrowCell:init()
local uiMap = self.baseObject:genAllChildren() local uiMap = self.baseObject:genAllChildren()
self.bg = uiMap["gift_cell.bg"] self.bg = uiMap["gift_cell.bg"]
self.bg:setTexture("assets/arts/textures/background/shop/shop_gift_banner_5.png")
self.leftArrow = uiMap["gift_cell.left_arrow"] self.leftArrow = uiMap["gift_cell.left_arrow"]
self.rightArrow = uiMap["gift_cell.right_arrow"] self.rightArrow = uiMap["gift_cell.right_arrow"]
@ -25,13 +26,7 @@ function GrowCell:init()
end end
-- 不限时时使用1类型 否则使用2类型 -- 不限时时使用1类型 否则使用2类型
self.originPriceImg1 = uiMap["gift_cell.bg.origin_price_1"] self.priceText = uiMap["gift_cell.bg.price"]
self.originPriceText1 = uiMap["gift_cell.bg.origin_price_1.text"]
self.priceText1 = uiMap["gift_cell.bg.price_1"]
self.originPriceImg2 = uiMap["gift_cell.bg.origin_price_2"]
self.originPriceText2 = uiMap["gift_cell.bg.origin_price_2.text"]
self.priceText2 = uiMap["gift_cell.bg.price_2"]
self.timeImg = uiMap["gift_cell.bg.time_img"] self.timeImg = uiMap["gift_cell.bg.time_img"]
self.timeText = uiMap["gift_cell.bg.time_img.text"] self.timeText = uiMap["gift_cell.bg.time_img.text"]
@ -61,16 +56,8 @@ function GrowCell:refresh(idx, gift)
end end
end end
self.reweardLayout:RefreshLayout() self.reweardLayout:RefreshLayout()
-- 价格(使用2类型) -- 价格
self.originPriceImg1:setVisible(false) self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id))
self.originPriceText1:setVisible(false)
self.priceText1:setVisible(false)
self.originPriceImg2:setVisible(false)
self.originPriceText2:setVisible(false)
self.priceText2:setVisible(true)
self.priceText2:setText(GFunc.getFormatPrice(cfgInfo.recharge_id))
-- 限时 -- 限时
self.timeImg:setVisible(true) self.timeImg:setVisible(true)
self:refreshTime() self:refreshTime()
@ -92,7 +79,7 @@ function GrowCell:refreshTime()
if remainTime <= 0 then if remainTime <= 0 then
remainTime = 0 remainTime = 0
end end
self.timeText:setText(Time:formatNumTimeStr(remainTime)) self.timeText:setText(Time:formatNumTime(remainTime))
end end
function GrowCell:onClickGift(id) function GrowCell:onClickGift(id)

View File

@ -4,6 +4,7 @@ local MAX_REWARD_COUNT = 4
function LevelCell:init() function LevelCell:init()
local uiMap = self.baseObject:genAllChildren() local uiMap = self.baseObject:genAllChildren()
self.bg = uiMap["gift_cell.bg"] self.bg = uiMap["gift_cell.bg"]
self.bg:setTexture("assets/arts/textures/background/shop/shop_gift_banner_4.png")
self.leftArrow = uiMap["gift_cell.left_arrow"] self.leftArrow = uiMap["gift_cell.left_arrow"]
self.rightArrow = uiMap["gift_cell.right_arrow"] self.rightArrow = uiMap["gift_cell.right_arrow"]
@ -25,13 +26,7 @@ function LevelCell:init()
end end
-- 不限时时使用1类型 否则使用2类型 -- 不限时时使用1类型 否则使用2类型
self.originPriceImg1 = uiMap["gift_cell.bg.origin_price_1"] self.priceText = uiMap["gift_cell.bg.price"]
self.originPriceText1 = uiMap["gift_cell.bg.origin_price_1.text"]
self.priceText1 = uiMap["gift_cell.bg.price_1"]
self.originPriceImg2 = uiMap["gift_cell.bg.origin_price_2"]
self.originPriceText2 = uiMap["gift_cell.bg.origin_price_2.text"]
self.priceText2 = uiMap["gift_cell.bg.price_2"]
self.timeImg = uiMap["gift_cell.bg.time_img"] self.timeImg = uiMap["gift_cell.bg.time_img"]
self.timeText = uiMap["gift_cell.bg.time_img.text"] self.timeText = uiMap["gift_cell.bg.time_img.text"]
@ -58,16 +53,8 @@ function LevelCell:refresh(idx, cfgInfo, clickCallback)
end end
end end
self.reweardLayout:RefreshLayout() self.reweardLayout:RefreshLayout()
-- 价格(使用1类型) -- 价格
self.originPriceImg1:setVisible(false) self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id))
self.originPriceText1:setVisible(false)
self.priceText1:setVisible(true)
self.originPriceImg2:setVisible(false)
self.originPriceText2:setVisible(false)
self.priceText2:setVisible(false)
self.priceText1:setText(GFunc.getFormatPrice(cfgInfo.recharge_id))
-- 限时(隐藏) -- 限时(隐藏)
self.timeImg:setVisible(false) self.timeImg:setVisible(false)

View File

@ -173,7 +173,7 @@ function GiftPopUI:updateTime()
remainTime = 0 remainTime = 0
self:checkNextPopGiftOrClose() self:checkNextPopGiftOrClose()
end end
self.timeText:setText(GFunc.getTimeStr(remainTime)) self.timeText:setText(Time:formatNumTime(remainTime))
end end
end end
elseif self.actType == PayManager.PURCHARSE_TYPE.GROW_UP_GIFT then -- 成长礼包 elseif self.actType == PayManager.PURCHARSE_TYPE.GROW_UP_GIFT then -- 成长礼包
@ -187,7 +187,7 @@ function GiftPopUI:updateTime()
remainTime = 0 remainTime = 0
self:checkNextPopGiftOrClose() self:checkNextPopGiftOrClose()
end end
self.timeText:setText(GFunc.getTimeStr(remainTime)) self.timeText:setText(Time:formatNumTime(remainTime))
end end
self.timeNode:setVisible(hasTime) self.timeNode:setVisible(hasTime)
end end

View File

@ -70,6 +70,7 @@ function GoldPigData:checkOpen()
self.nextShowTime = self.endTime + self:getTimeOverCD() self.nextShowTime = self.endTime + self:getTimeOverCD()
if Time:getServerTime() >= self.endTime then -- 超过时间该消失了 if Time:getServerTime() >= self.endTime then -- 超过时间该消失了
self.data.isOpen = false self.data.isOpen = false
self:levelDown()
else else
self.data.isOpen = true self.data.isOpen = true
DataManager:registerDataCd("GoldPigData") DataManager:registerDataCd("GoldPigData")
@ -96,6 +97,7 @@ function GoldPigData:addGoldPigCount()
return return
end end
if self.data.count >= info.max_diamond then -- 已经满了 if self.data.count >= info.max_diamond then -- 已经满了
self.lastCount = self.data.count
return return
end end
self.lastCount = self.data.count self.lastCount = self.data.count

View File

@ -342,15 +342,17 @@ function ShopData:resetCommonDailyCoinAdCount()
end end
-- 根据时间得到当前挂机金币奖励 -- 根据时间得到当前挂机金币奖励
function ShopData:getCommonDailyCoinNum(time) function ShopData:getCommonDailyCoinNum(id)
local coinPerHour = DataManager.IdleData:getGoldPerHour() local cfgInfo = self:getMallGoldConfig()[id]
return coinPerHour * time // 3600 if cfgInfo then
return cfgInfo.gold.num
end
end end
function ShopData:getCommonDailyCoinDataById(id) function ShopData:getCommonDailyCoinDataById(id)
local cfgInfo = self:getMallGoldConfig()[id] local cfgInfo = self:getMallGoldConfig()[id]
if cfgInfo then if cfgInfo then
return self:getCommonDailyCoinNum(cfgInfo.idel_time), cfgInfo.cost return cfgInfo.gold.num, cfgInfo.cost
end end
end end
@ -764,14 +766,12 @@ function ShopData:getHasGotFirstRechargeReward()
return boughtNum > 0 return boughtNum > 0
end end
-- 侧边栏是否展示 要求功能开启 等级不低于2 未领取该奖励 -- 侧边栏是否展示 要求功能开启 未领取该奖励
function ShopData:getShowFirstRechargeSideBar() function ShopData:getShowFirstRechargeSideBar()
if not self:getIsFirstRechargeOpen() then if not self:getIsFirstRechargeOpen() then
return false return false
end end
if not self:getHasGotFirstRechargeReward() then
local lv = DataManager.PlayerData:getLv()
if lv > 1 and not self:getHasGotFirstRechargeReward() then
return true return true
else else
return false return false