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