【神将来袭】真·差战斗 和为小游戏转盘增加log
parent
2f07beaa08
commit
ecb948a613
|
@ -526,6 +526,7 @@ UpViewRechargeType = {
|
|||
PuTiZi = 1203,--菩提子
|
||||
XianLingCao = 1202,--仙灵草
|
||||
QuLingBi = 1205,--驱灵币
|
||||
XinJiangCoin = 1210,--新将来袭代币
|
||||
YHMF= 21,--妖魂魔符
|
||||
DingKunShenChu = 1004,-- 定卦神锄
|
||||
}
|
||||
|
@ -1495,6 +1496,7 @@ HELP_TYPE = {
|
|||
PokemonResolve=75,--灵兽放生
|
||||
YiJingBaoKu=77,--易经宝库
|
||||
LingShouBaoGe=78,--灵兽宝阁
|
||||
XinJiangLaiXi=81,--新将来袭
|
||||
}
|
||||
|
||||
NumToComplexFont = {
|
||||
|
|
|
@ -254,7 +254,7 @@ function this.XinJiangBuildData()
|
|||
data.endTime = ActData.endTime
|
||||
data.fightTime = PrivilegeManager.GetPrivilegeRemainValue(2012)
|
||||
data.buyTime = PrivilegeManager.GetPrivilegeRemainValue(2013)
|
||||
data.money = BagManager.GetTotalItemNum(1209)
|
||||
data.money = BagManager.GetTotalItemNum(UpViewRechargeType.XinJiangCoin)
|
||||
local rewardGroupId = newHeroData.DropList[#newHeroData.DropList][2]
|
||||
data.reward = ConfigManager.GetConfigData(ConfigName.RewardGroup,rewardGroupId).ShowItem
|
||||
data.activityId = ActData.activityId
|
||||
|
|
|
@ -4,10 +4,7 @@ local allData={}
|
|||
local itemsGrid = {}--item重复利用
|
||||
local sortingOrder = 0
|
||||
local parent = {}
|
||||
-- local properTypeConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
|
||||
-- local rechargeConfigId = 0
|
||||
-- local rechargeData = {}
|
||||
-- local fakeId = 0
|
||||
|
||||
this.LiveObj = nil
|
||||
function XinJiangLaiXi:ctor(mainPanel, gameObject)
|
||||
this.mainPanel = mainPanel.transform
|
||||
|
@ -22,6 +19,7 @@ function XinJiangLaiXi:InitComponent()
|
|||
this.fightBtn = Util.GetGameObject(this.gameObject, "layout/fightBtn")
|
||||
this.storeBtn = Util.GetGameObject(this.gameObject, "storeBtn")
|
||||
this.helpBtn = Util.GetGameObject(this.gameObject, "helpBtn")
|
||||
this.helpPosition=this.helpBtn:GetComponent("RectTransform").localPosition
|
||||
this.scrollItem = Util.GetGameObject(this.gameObject, "scroller/grid")
|
||||
this.liveRoot = Util.GetGameObject(this.gameObject, "bg/liveRoot")
|
||||
this.tip1 = Util.GetGameObject(this.gameObject, "layout/Text1"):GetComponent("Text")
|
||||
|
@ -40,18 +38,49 @@ end
|
|||
|
||||
--绑定事件(用于子类重写)
|
||||
function XinJiangLaiXi:BindEvent()
|
||||
Util.AddClick(this.fightBtn,function()
|
||||
local fdata, fseed = BattleManager.GetFakeBattleData(1006)
|
||||
local testFightData = {
|
||||
fightData = fdata,
|
||||
fightSeed = fseed,
|
||||
fightType = 0,
|
||||
maxRound = 20
|
||||
}
|
||||
UIManager.OpenPanel(UIName.BattlePanel, testFightData, BATTLE_TYPE.Test)
|
||||
Util.AddClick(this.helpBtn, function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.XinJiangLaiXi,this.helpPosition.x,this.helpPosition.y)
|
||||
end)
|
||||
|
||||
Util.AddClick(this.storeBtn,function()
|
||||
Util.AddClick(this.addBtn, function()
|
||||
if allData.buyTime > 0 then
|
||||
local costId, finalNum, oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.FUNCTION_SHOP,10036, 1)
|
||||
local itemName = ConfigManager.GetConfigData(ConfigName.ItemConfig,costId).Name
|
||||
MsgPanel.ShowTwo(string.format( Language[12332],finalNum,itemName), nil, function()
|
||||
--买东西
|
||||
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,10036,1,function()
|
||||
PopupTipPanel.ShowTip(Language[12328])
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(2013, 1)--更新特权
|
||||
XinJiangLaiXi:Refresh()
|
||||
end)
|
||||
end)
|
||||
else
|
||||
PopupTipPanel.ShowTip("今日已无购买次数~")
|
||||
end
|
||||
end)
|
||||
|
||||
Util.AddClick(this.fightBtn,function()
|
||||
if allData.fightTime > 0 then
|
||||
PopupTipPanel.ShowTip("开始战斗!!!!~")
|
||||
else
|
||||
if allData.buyTime > 0 then
|
||||
local costId, finalNum, oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.FUNCTION_SHOP,10036, 1)
|
||||
local itemName = ConfigManager.GetConfigData(ConfigName.ItemConfig,costId).Name
|
||||
MsgPanel.ShowTwo(string.format( Language[12332],finalNum,itemName), nil, function()
|
||||
--买东西
|
||||
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,10036,1,function()
|
||||
PopupTipPanel.ShowTip(Language[12328])
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(2013, 1)--更新特权
|
||||
XinJiangLaiXi:Refresh()
|
||||
end)
|
||||
end)
|
||||
else
|
||||
PopupTipPanel.ShowTip("今日已无挑战次数~")
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
Util.AddClick(this.storeBtn,function()
|
||||
this.shop:SetActive(true)
|
||||
this.btnBack:SetActive(false)
|
||||
this.tabList:SetActive(false)
|
||||
|
@ -84,10 +113,15 @@ end
|
|||
function XinJiangLaiXi:OnShow(_sortingOrder,_parent)
|
||||
parent = _parent
|
||||
sortingOrder = _sortingOrder
|
||||
XinJiangLaiXi:Refresh()
|
||||
end
|
||||
|
||||
function XinJiangLaiXi:Refresh()
|
||||
allData = DynamicActivityManager.XinJiangBuildData()
|
||||
XinJiangLaiXi:OnShowData()
|
||||
XinJiangLaiXi:SetTime()
|
||||
end
|
||||
|
||||
function XinJiangLaiXi:OnShowData()
|
||||
if not itemsGrid then
|
||||
itemsGrid = {}
|
||||
|
@ -145,7 +179,7 @@ function XinJiangLaiXi:StoreShow()
|
|||
if not this.shopView then
|
||||
this.shopView = SubUIManager.Open(SubUIConfig.ShopView, this.content.transform)
|
||||
end
|
||||
this.shopView:ShowShop(SHOP_TYPE.XINJIANG_SHOP,sortingOrder)
|
||||
this.shopView:ShowShop(SHOP_TYPE.ACTIVITY_SHOP,sortingOrder)
|
||||
end
|
||||
|
||||
function XinJiangLaiXi:OnClose()
|
||||
|
@ -158,12 +192,12 @@ function XinJiangLaiXi:OnDestroy()
|
|||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
-- if this.LiveObj then
|
||||
-- poolManager:UnLoadLive(this.LiveObj.name,this.LiveObj)
|
||||
-- this.LiveObj = nil
|
||||
-- end
|
||||
if this.LiveObj then
|
||||
poolManager:UnLoadLive(this.LiveObj.name,this.LiveObj)
|
||||
this.LiveObj = nil
|
||||
end
|
||||
sortingOrder = 0
|
||||
-- itemsGrid = {}
|
||||
itemsGrid = {}
|
||||
end
|
||||
|
||||
function XinJiangLaiXi:OnHide()
|
||||
|
|
|
@ -52,6 +52,7 @@ function this.Show()
|
|||
this.test(msg.drop.itemlist[1].itemId)
|
||||
id = msg.drop.itemlist[1].itemId
|
||||
num = msg.drop.itemlist[1].itemNum
|
||||
LogYellow("掉落的Id:"..id.." 数量:"..num)
|
||||
--4秒后显示掉落
|
||||
-- Timer.New(function()
|
||||
-- if TrialMiniGameManager.IsGameDone() then
|
||||
|
|
Loading…
Reference in New Issue