Merge branch 'china/dev_bt' of http://60.1.1.230/gaoxin/JL_Client into china/dev_bt

dev_chengFeng
lihaiyang 2022-10-13 15:51:09 +08:00
commit be608b9df2
13 changed files with 4740 additions and 85 deletions

View File

@ -31021,7 +31021,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &1481527222957545325
RectTransform:
m_ObjectHideFlags: 0
@ -36242,6 +36242,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1481527222957545325}
- {fileID: 7137898665826321498}
m_Father: {fileID: 1481527222458419407}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -36790,7 +36791,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &4260693617139021514
RectTransform:
m_ObjectHideFlags: 0
@ -36808,10 +36809,10 @@ RectTransform:
m_Father: {fileID: 1481527223116321039}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 641.5, y: -50}
m_SizeDelta: {x: 179, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8724028868596978955
CanvasRenderer:
@ -36966,6 +36967,85 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!1 &2750855782982902283
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7137898665826321498}
- component: {fileID: 9022163480280373877}
- component: {fileID: 6291420703489925548}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7137898665826321498
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2750855782982902283}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1481527223225029562}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 11.39}
m_SizeDelta: {x: 160, y: 85.13}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9022163480280373877
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2750855782982902283}
m_CullTransparentMesh: 0
--- !u!114 &6291420703489925548
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2750855782982902283}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.9843138, g: 0.9803922, b: 0.9686275, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
m_FontSize: 60
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 3
m_MaxSize: 60
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: "6\u5143"
--- !u!1 &3327902824083023982
GameObject:
m_ObjectHideFlags: 0
@ -39236,7 +39316,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &8509117109850459232
RectTransform:
m_ObjectHideFlags: 0
@ -39254,10 +39334,10 @@ RectTransform:
m_Father: {fileID: 1481527223116321039}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 457.5, y: -50}
m_SizeDelta: {x: 179, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3513381775929146546
CanvasRenderer:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: efb6d932cb8cbed4cb4169243c4dff50
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8988e71d9994b8d44b9246e24d85ce12
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1374,7 +1374,7 @@ ActivityTypeDef = {
ChapterAward = 3, --章节奖励
-- FirstRecharge = 4, --首充
-- AccumulativeRecharge = 5, --累计充值
FirstRecharge = 5, --首充
FirstRecharge = 108, --首充
GrowthReward = 6, --成长礼金
RecruitTreasure = 7, --招募秘宝
TreasureOfSomeBody = 8,--孙龙的宝藏
@ -1730,6 +1730,7 @@ FUNCTION_OPEN_TYPE = {
CROSS_RANK=128,--跨服排行榜
Hot_Hero_Rank=132,--神将热榜
NewShenzun=133,--新神尊特权
XIUWEI=136,--主角修为
Number_Game=149,--数字游戏
}

View File

@ -561,4 +561,5 @@ SubUIConfig = {
[40] = {name = "ShenzunPrivilegePage",assetName = "ShenzunPrivilegePage",script = "Modules/Operating/ShenzunPrivilegePage"},
[41] = {name = "HHBJPage",assetName = "HHBJPage",script = "Modules/Operating/HHBJPage"},
[42] = {name = "GMShuaChongTeQuan",assetName = "GMShuaChongTeQuan",script = "Modules/Operating/GMShuaChongTeQuan"},
[43] = {name = "GMFreeRecharge",assetName = "GMFreeRecharge",script = "Modules/Operating/GMFreeRecharge"},
}

View File

@ -59,41 +59,67 @@ function DayRewardItem:SetValue(context,_sortingOrder)
AccumRecharge = missInfo.progress
end
end
if (self.context.Values[1][1] == 1 and AccumRecharge > 0)
or AccumRecharge >= self.context.Values[1][1] then
local day = GetTimePass(FirstRechargeManager.GetRechargeTime())--FirstRechargeManager.GetRechargeTime()
if self.context.Values[1][2] <= day then
local state = ActivityGiftManager.GetActivityInfo(context.ActivityId, context.Id).state
self.receiveBtn:GetComponent("Image").sprite = self.spLoader:LoadSprite("r_shouchong_lingqu_01_zh")
self.receiveBtn.enabled = true
self.receivedFlag:SetActive(state == 1)
self.receiveBtn.gameObject:SetActive(state ~= 1)
self.redPoint:SetActive(state ~= 1)
else
self.receiveBtn.gameObject:SetActive(true)
self.receiveBtn:GetComponent("Image").sprite = self.spLoader:LoadSprite("r_shouchong_lingqu_02_zh")
self.receiveBtn.enabled = false
self.receivedFlag:SetActive(false)
self.redPoint:SetActive(false)
end
else
LogError("context.ActivityId=="..context.ActivityId.." context.Id=="..context.Id)
local state = ActivityGiftManager.GetActivityInfo(context.ActivityId, context.Id).state
LogError("state=="..state)
--if self.context.Values[1][1] == 1 or AccumRecharge >= self.context.Values[1][1] then
-- if state==1 then
-- local day = GetTimePass(FirstRechargeManager.GetRechargeTime())--FirstRechargeManager.GetRechargeTime()
-- if self.context.Values[1][2] <= day then
-- --local state = ActivityGiftManager.GetActivityInfo(context.ActivityId, context.Id).state
-- self.receiveBtn:GetComponent("Image").sprite = self.spLoader:LoadSprite("r_shouchong_lingqu_01_zh")
-- self.receiveBtn.enabled = true
-- self.receivedFlag:SetActive(state == 1)
-- self.receiveBtn.gameObject:SetActive(state ~= 1)
-- self.redPoint:SetActive(state ~= 1)
-- else
-- self.receiveBtn.gameObject:SetActive(true)
-- self.receiveBtn:GetComponent("Image").sprite = self.spLoader:LoadSprite("r_shouchong_lingqu_02_zh")
-- self.receiveBtn.enabled = false
-- self.receivedFlag:SetActive(false)
-- self.redPoint:SetActive(false)
-- end
-- else
-- end
if state==0 then
self.receiveBtn.gameObject:SetActive(true)
self.receiveBtn:GetComponent("Image").sprite = self.spLoader:LoadSprite("r_shouchong_lingqu_02_zh")
self.receiveBtn.enabled = false
self.receivedFlag:SetActive(false)
self.redPoint:SetActive(false)
elseif state==1 then
self.receiveBtn:GetComponent("Image").sprite = self.spLoader:LoadSprite("r_shouchong_lingqu_01_zh")
self.receiveBtn.enabled = true
self.receivedFlag:SetActive(false)
self.receiveBtn.gameObject:SetActive(state==1)
self.redPoint:SetActive(state == 1)
elseif state==2 then
self.receiveBtn:GetComponent("Image").sprite = self.spLoader:LoadSprite("r_shouchong_lingqu_01_zh")
self.receiveBtn.enabled = true
self.receivedFlag:SetActive(state == 2)
self.receiveBtn.gameObject:SetActive(false)
self.redPoint:SetActive(false)
end
--end
end
function DayRewardItem:OnReceivedBtnClicked()
NetManager.GetActivityRewardRequest(self.context.Id, self.context.ActivityId, function(drop)
UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1)
ActivityGiftManager.SetActivityInfo(self.context.ActivityId, self.context.Id, 1)
--ActivityGiftManager.SetActivityInfo(self.context.ActivityId, self.context.Id, 1)
self.receiveBtn.gameObject:SetActive(false)
self.receivedFlag:SetActive(true)
self.redPoint:SetActive(false)
local index = FirstRechargeManager.GetFirstRechargeIndexByMoney(self.context.Values[1][1])
LogError("self.context.Values[1][1]=="..self.context.Values[1][1])
local index =0 --FirstRechargeManager.GetFirstRechargeIndexByMoney(self.context.Values[1][1])
if self.context.Id<=10803 then
index=1
else
index=2
end
self.mainPanel:SetTabRedPointStatus(index)
CheckRedPointStatus(RedPointType.FirstRecharge)
if FirstRechargeManager.GetReceiveAll() then

View File

@ -29,12 +29,17 @@ end
function this.GetRedPointStatus(index)
local redPoint = false
local money = FirstRechargeManager.GetFirstRechargeMoneyByIndex(index)
--local money = FirstRechargeManager.GetFirstRechargeMoneyByIndex(index)
local activityInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.FirstRecharge)
for _, missionInfo in ipairs(activityInfo.mission) do
local rewardInfo = activityRewardConfig[missionInfo.missionId]
if rewardInfo and rewardInfo.Values[1][1] == money then
redPoint = redPoint or this.GetDayItemRedPoint(missionInfo, rewardInfo)
LogError("rewardInfo.Values[1][1]=="..rewardInfo.Values[1][1])
if rewardInfo and rewardInfo.Values[1][1] == index*10000 then
LogError("missionInfo.state===="..missionInfo.state)
redPoint = missionInfo.state==1
if redPoint then
return true
end
end
end
return redPoint
@ -42,29 +47,30 @@ end
function this.GetDayItemRedPoint(missionInfo, context)
local AccumRecharge = missionInfo.progress
if AccumRecharge == 0 then
return false
else
--if this.GetAccumRechargeValue() >= context.Values[1][1] then
if AccumRecharge >= context.Values[1][1] then
if this.isFirstRecharge == 0 then
this.SetRechargeTime(math.floor(GetTimeStamp()))
this.isFirstRecharge = 1
end
local day = GetTimePass(this.GetRechargeTime())
--local day = GetTimePass(math.floor(GetTimeStamp()))
if context.Values[1][2] <= day then
local state = missionInfo.state
return state ~= 1
else
return false
end
else
return false
end
end
return false
return missionInfo.state==1
-- local AccumRecharge = missionInfo.progress
-- if AccumRecharge == 0 then
-- return false
-- else
-- --if this.GetAccumRechargeValue() >= context.Values[1][1] then
-- if AccumRecharge >= context.Values[1][1] then
-- if this.isFirstRecharge == 0 then
-- this.SetRechargeTime(math.floor(GetTimeStamp()))
-- this.isFirstRecharge = 1
-- end
-- local day = GetTimePass(this.GetRechargeTime())
-- --local day = GetTimePass(math.floor(GetTimeStamp()))
-- if context.Values[1][2] <= day then
-- local state = missionInfo.state
-- return state ~= 1
-- else
-- return false
-- end
-- else
-- return false
-- end
-- end
-- return false
end
function this.GetReceiveAll()

View File

@ -6,11 +6,12 @@
* @Copyright Copyright (c) 2019, MagicianJoker
--]]
local DayRewardItem = require("Modules/FirstRecharge/DayRewardItem")
local rechargeConfig=ConfigManager.GetConfig(ConfigName.RechargeCommodityConfig)
---@class FirstRechargePanel
local FirstRechargePanel = quick_class("FirstRechargePanel", BasePanel)
local kMaxTab, kMaxDay = 4, 3
local rechargeId=0
local kMaxTab, kMaxDay = 2, 3
local isPay=false
local TextColorDef = {
[1] = Color.New(48 / 255, 31 / 255, 33 / 255, 1),
[2] = Color.New(246 / 255, 235 / 255, 179 / 255, 1)
@ -39,7 +40,7 @@ local TipConfig = {
local heroImage={
[1]="r_shouchong_hero_6",
[2]="r_shouchong_hero_100",
[2]="r_shouchong_hero_6",
[3]="r_shouchong_hero_200",
[4]="r_shouchong_hero_500",
}
@ -98,8 +99,9 @@ function FirstRechargePanel:InitComponent()
--bottomPart
self.reChargeBtn = Util.GetGameObject(self.transform, "frame/rechargeBtn")
self.reChargeTxt = Util.GetGameObject(self.transform, "frame/rechargeBtn/Text"):GetComponent("Text")
self.reChargeTips = Util.GetGameObject(self.transform, "frame/tips"):GetComponent("Text")
self.reChargeTips.gameObject:SetActive(false)
self.effect = Util.GetGameObject(self.transform, "frame/effect")
self.qianyao = Util.GetGameObject(self.transform, "qianyao")
self.ani = self.transform:GetComponent("Animator")
@ -201,11 +203,18 @@ function FirstRechargePanel:OnShow()
if missInfo and missInfo.progress then
-- 获取充值额度
AccumRecharge = missInfo.progress
--LogError("missInfo.missionId=="..missInfo.missionId)
-- 构建数据
local money = activityRewardConfig[missInfo.missionId].Values[1][1]
local index = FirstRechargeManager.GetFirstRechargeIndexByMoney(money)
if not _MoneyDataNum[index] then
--LogError("money===="..money)
--local index = FirstRechargeManager.GetFirstRechargeIndexByMoney(money)
local index=0
if money==10000 then
index=1
else
index=2
end
if _MoneyDataNum[index]==nil then
_MoneyDataNum[index] = {}
end
table.insert(_MoneyDataNum[index], missInfo)
@ -272,35 +281,57 @@ function FirstRechargePanel:OnTabChanged(index)
else
self.heroPreviewBtn:SetActive(true)
end
local money=0
for i, title in ipairs(self.tabTitles) do
title.color = i == index and TextColorDef[2] or TextColorDef[1]
local money = FirstRechargeManager.GetFirstRechargeMoneyByIndex(i)
title.text = string.format(Language[12281], string.format(MoneyUtil.GetMoneyUnitName(), money))
--local money = FirstRechargeManager.GetFirstRechargeMoneyByIndex(i)
if i==1 then
title.text ="超值首充"
elseif i==2 then
title.text ="豪华首充"
end
end
self.stageImage6.gameObject:SetActive(index == 1)
self.stageImage30.gameObject:SetActive(index == 2)
self.stageImage100.gameObject:SetActive(index == 3)
self.stageImage200.gameObject:SetActive(index == 4)
if index==1 then
money=10000
elseif index==2 then
money=20000
end
self.stageImage6.gameObject:SetActive(index == 5)
self.stageImage30.gameObject:SetActive(index == 5)
self.stageImage100.gameObject:SetActive(index == 5)
self.stageImage200.gameObject:SetActive(index == 5)
self:ShowContent(index)
self.selectTabIndex = index
local AccumRecharge = 0
self.offsetIndex = 0
local money = FirstRechargeManager.GetFirstRechargeMoneyByIndex(index)
--local money = FirstRechargeManager.GetFirstRechargeMoneyByIndex(index)
rechargeId=money
local tempData = _MoneyDataNum[index]
isPay=false
for _, missInfo in ipairs(tempData) do
if missInfo and missInfo.progress and activityRewardConfig[missInfo.missionId].Values[1][1] == money then
AccumRecharge = missInfo.progress
if AccumRecharge >= activityRewardConfig[missInfo.missionId].Values[1][1] then
local day = GetTimePass(FirstRechargeManager.GetRechargeTime())--FirstRechargeManager.GetRechargeTime()
if missInfo.state ~= 1 and activityRewardConfig[missInfo.missionId].Values[1][2] <= day then
self.offsetIndex = _
break
end
LogError("missionInfo.state=="..missInfo.state)
-- if AccumRecharge >= activityRewardConfig[missInfo.missionId].Values[1][1] then
-- local day = GetTimePass(FirstRechargeManager.GetRechargeTime())--FirstRechargeManager.GetRechargeTime()
-- if missInfo.state ~= 1 and activityRewardConfig[missInfo.missionId].Values[1][2] <= day then
-- self.offsetIndex = _
-- break
-- end
-- end
if missInfo.state>0 then
isPay=true
end
end
end
if isPay then
self.reChargeTxt.text=Language[10514]
else
self.reChargeTxt.text=rechargeConfig[money].Price..Language[11358]
end
if self.offsetIndex == 0 then
self.offsetIndex = 1
end
@ -358,7 +389,43 @@ end
-- end
function FirstRechargePanel:OnRechargeBtnClicked()
JumpManager.GoJump(36004)
if isPay then
return
end
PayManager.Pay(rechargeId,function()
--self:OnShow()
self.activityInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.FirstRecharge)
_MoneyDataNum = {}
for _, missInfo in ipairs(self.activityInfo.mission) do
if missInfo and missInfo.progress then
-- 获取充值额度
AccumRecharge = missInfo.progress
--LogError("missInfo.missionId=="..missInfo.missionId)
-- 构建数据
local money = activityRewardConfig[missInfo.missionId].Values[1][1]
--LogError("money===="..money)
--local index = FirstRechargeManager.GetFirstRechargeIndexByMoney(money)
local index=0
if money==10000 then
index=1
else
index=2
end
if _MoneyDataNum[index]==nil then
_MoneyDataNum[index] = {}
end
table.insert(_MoneyDataNum[index], missInfo)
end
end
self.reChargeTips.text = Language[10664]..string.format(MoneyUtil.GetMoneyUnitName(),AccumRecharge)--string.format(Language[10665], AccumRecharge)
self:OnTabChanged(self.selectTabIndex)
for i = 1, kMaxTab do
self:SetTabRedPointStatus(i)
end
-- 判断页签切换是否显示
Util.GetGameObject(self.transform, "frame/tabsContent"):SetActive(table.nums(_MoneyDataNum)>1)
end)
--JumpManager.GoJump(36004)
-- if not ShopManager.IsActive(SHOP_TYPE.SOUL_STONE_SHOP) then
-- PopupTipPanel.ShowTip(Language[10422])
-- return
@ -373,9 +440,11 @@ function FirstRechargePanel:OnRechargeBtnClicked()
-- JumpManager.GoJump(36008)
-- end
-- end
end
function FirstRechargePanel:SetTabRedPointStatus(tabIndex)
--LogError("tabIndex=="..tabIndex)
local redPointStatus = FirstRechargeManager.GetRedPointStatus(tabIndex)
self.tabRedPoint[tabIndex]:SetActive(redPointStatus)
end

View File

@ -0,0 +1,164 @@

local GMFreeRecharge = {}
self=GMFreeRecharge
local artConfig=ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
local rewardCom=ConfigManager.GetConfig(ConfigName.RechargeCommodityConfig)
local sortingOrder = 0
local TabBox = require("Modules/Common/TabBox")
local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "直充",img = "gm_shuachong_scGM_01_zh",id=7 },
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "神充" ,img = "gm_shuachong_cjGM_01_zh",id=8 },
}
function GMFreeRecharge:New(gameObject)
local b = {}
b.gameObject = gameObject
b.transform = gameObject.transform
setmetatable(b, { __index = GMFreeRecharge })
return b
end
local TabAdapter=nil
local SwitchView=nil
--初始化组件(用于子类重写)
function GMFreeRecharge:InitComponent()
self.spLoader = SpriteLoader.New()
self.titleImg=Util.GetGameObject(self.gameObject,"growPack/Content/Name"):GetComponent("Image")
self.coinNumTxt=Util.GetGameObject(self.gameObject,"growPack/Content/Num"):GetComponent("Text")
self.tipTxt=Util.GetGameObject(self.gameObject,"growPack/Content/Tip"):GetComponent("Text")
self.tabBox = Util.GetGameObject(self.gameObject, "TabBox")
self.progressImg=Util.GetGameObject(self.gameObject,"growPack/Content/Progress/Image"):GetComponent("Image")
self.progerssTxt=Util.GetGameObject(self.gameObject,"growPack/Content/Progress/Text"):GetComponent("Text")
self.itemPre=Util.GetGameObject(self.gameObject,"scrollbg/scrollroot/item")
self.grid=Util.GetGameObject(self.gameObject,"scrollbg/scrollroot")
local rootHight = self.grid.transform.rect.height
local width = self.grid.transform.rect.width
self.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.grid.transform,self.itemPre, nil, Vector2.New(width, rootHight), 1, 3, Vector2.New(50,10))
self.ScrollView.moveTween.MomentumAmount = 1
self.ScrollView.moveTween.Strength = 2
--self.ScrollView.elastic = false
TabAdapter=function(tab, index, status)
local tabLab = Util.GetGameObject(tab, "Text")
Util.GetGameObject(tab,"Image"):GetComponent("Image").sprite = self.spLoader:LoadSprite(_TabData[index][status])
tabLab:GetComponent("Text").text = _TabData[index].name
end
--切换视图
SwitchView=function(_index)
local list=ConfigManager.GetAllConfigsDataByKey(ConfigName.GMMaster,"Type",_TabData[_index].id)
if list then
LogError("3333333333333 list len=="..#list)
self.ScrollView:SetData(list, function (index, go)
self:SingleDataShow(go,list[index])
end,false)
else
LogError("222222222222222222")
end
end
self.TabCtrl = TabBox.New()
self.TabCtrl:SetTabAdapter(TabAdapter)
self.TabCtrl:SetChangeTabCallBack(SwitchView)
self.TabCtrl:Init(self.tabBox, _TabData, 1)
end
function GMFreeRecharge:SingleDataShow(item,data)
item.gameObject:SetActive(true)
local iconImg=Util.GetGameObject(item,"GameObject/icon"):GetComponent("Image")
local getImg=Util.GetGameObject(item,"GameObject/itemIcon"):GetComponent("Image")
local getTxt=Util.GetGameObject(item,"GameObject/itemNum"):GetComponent("Text")
local extraObj=Util.GetGameObject(item,"GameObject/first")
local extImg=Util.GetGameObject(item,"GameObject/first/Image"):GetComponent("Image")
local extTxt=Util.GetGameObject(item,"GameObject/first/Text"):GetComponent("Text")
local costObj=Util.GetGameObject(item,"GameObject/need")
local costImg=Util.GetGameObject(item,"GameObject/need/Image"):GetComponent("Image")
local costTxt=Util.GetGameObject(item,"GameObject/need/Text"):GetComponent("Text")
local nameTxt=Util.GetGameObject(item,"GameObject/price/Text"):GetComponent("Text")
local btn=Util.GetGameObject(item,"GameObject/price")
nameTxt.text=data.Name
local cost=data.Price
if cost[2] then
costObj:SetActive(true)
costImg.sprite=self.spLoader:LoadSprite(artConfig[itemConfig[cost[2][1]].ResourceID].Name)
costTxt.text=cost[2][2]
else
costObj:SetActive(false)
end
local rechargeConfig=ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,data.PackID)
if rechargeConfig and rechargeConfig.RewardShow then
nameTxt.text=rechargeConfig.Name
local reward=rechargeConfig.RewardShow
getImg.sprite=self.spLoader:LoadSprite(artConfig[itemConfig[reward[1][1]].ResourceID].Name)
getTxt.text=PrintWanNum(reward[1][2])
if reward[2] then
extraObj:SetActive(true)
extImg.sprite=self.spLoader:LoadSprite(artConfig[itemConfig[reward[2][1]].ResourceID].Name)
extTxt.text=PrintWanNum(reward[2][2])
else
extraObj:SetActive(false)
end
end
Util.AddOnceClick(btn,function()
PayManager.Pay(data.PackID,function()
local num=BagManager.GetItemCountById(1367)
self.coinNumTxt.text="GM余额"..num
end)
end)
end
--绑定事件(用于子类重写)
function GMFreeRecharge:BindEvent()
end
--添加事件监听(用于子类重写)
function GMFreeRecharge:AddListener()
end
--移除事件监听(用于子类重写)
function GMFreeRecharge:RemoveListener()
end
--界面打开时调用(用于子类重写)
function GMFreeRecharge:OnOpen(_activityConfig,_index,parent)
self.actConfig = _activityConfig
self.pageIndex = _index
self.parent = parent
end
function GMFreeRecharge:OnSortingOrderChange()
end
-- 打开,重新打开时回调
function GMFreeRecharge:OnShow(_sortingOrder)
self.gameObject:SetActive(true)
sortingOrder = _sortingOrder
local num=BagManager.GetItemCountById(1367)
self.coinNumTxt.text="GM余额"..num
local useTime=PrivilegeManager.GetPrivilegeUsedTimes(PRIVILEGE_TYPE.GM_YI_YUAN_UP_TIME)
local maxNum=ActivityGiftManager.GetYiYuanUpMaxTime()
self.progressImg.fillAmount=useTime/maxNum
self.progerssTxt.text=useTime.."/"..maxNum
end
local gifts={}
local activityData={}
-- 妖晶数量显示
--界面关闭时调用(用于子类重写)
function GMFreeRecharge:OnClose()
self.gameObject:SetActive(false)
end
--界面销毁时调用(用于子类重写)
function GMFreeRecharge:OnDestroy()
self.spLoader:Destroy()
SubUIManager.Close(self.ScrollView)
end
return GMFreeRecharge

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 34602140c4da6ad46a0a29d1f67b9a87
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -5,6 +5,7 @@ local PropertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
local XiuXianSkillConfig = ConfigManager.GetConfig(ConfigName.XiuXianSkillConfig)
local SkillBaseConfig= ConfigManager.GetConfig(ConfigName.PlayerSkillBasicTable)
local skillSystemConfig = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,FUNCTION_OPEN_TYPE.PLAYER_SKILL)
local xiuWeiSystemConfig = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,FUNCTION_OPEN_TYPE.XIUWEI)
function this.Initialize()
this.PracticeLevel = 1--小境界id
this.PracticeBigLevel = 1--大境界数
@ -776,6 +777,10 @@ function this.getDataOfCur()
end
function this.CheckPlayerCultivetionRed()
if xiuWeiSystemConfig.IsOpen==0 then
return false
end
local maxLevel,statePower,achivePower = this.getDataOfCur()
if maxLevel > this.CultivationLevel then
FormationManager.UserPowerChanged()

View File

@ -7,6 +7,7 @@ local newPower = 0
local oldBigLevel = 0
local globalSystemConfig = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,FUNCTION_OPEN_TYPE.FOURQUADRANT)
local skillSystemConfig = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,FUNCTION_OPEN_TYPE.PLAYER_SKILL)
local xiuWeiSystemConfig = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,FUNCTION_OPEN_TYPE.XIUWEI)
local SkillBaseConfig= ConfigManager.GetConfig(ConfigName.PlayerSkillBasicTable)
function Practice:InitComponent()
self.spLoader = SpriteLoader.New()
@ -248,15 +249,19 @@ function Practice:OnOpen()
self.mask:SetActive(false)
self.skillObj:SetActive(skillSystemConfig.IsOpen==1)
self.cultivationBtn:SetActive(xiuWeiSystemConfig.IsOpen==1)
Practice:SetSkillInfo()
end
--设置技能信息显示
function Practice:SetSkillInfo()
CheckRedPointStatus(RedPointType.playerSkill1)
CheckRedPointStatus(RedPointType.playerSkill2)
CheckRedPointStatus(RedPointType.playerSkill3)
CheckRedPointStatus(RedPointType.playerSkill4)
if skillSystemConfig.IsOpen==1 then
CheckRedPointStatus(RedPointType.playerSkill1)
CheckRedPointStatus(RedPointType.playerSkill2)
CheckRedPointStatus(RedPointType.playerSkill3)
CheckRedPointStatus(RedPointType.playerSkill4)
end
local list=PracticeManager.GetSkillInfo()
local index=1
for i = 100, 400,100 do