【称号坐骑时装】修改

dev_chengFeng
zhangqiang 2021-03-30 11:38:20 +08:00
parent d156471087
commit 2122997c3d
4 changed files with 28 additions and 24 deletions

View File

@ -2857,7 +2857,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!224 &1256121442543912179 --- !u!224 &1256121442543912179
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -7389,7 +7389,7 @@ RectTransform:
m_GameObject: {fileID: 4763158534623160792} m_GameObject: {fileID: 4763158534623160792}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.9, y: 0.9, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 1019933089106556324} m_Father: {fileID: 1019933089106556324}
m_RootOrder: 2 m_RootOrder: 2
@ -18510,7 +18510,7 @@ MonoBehaviour:
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData: m_FontData:
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3} m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
m_FontSize: 38 m_FontSize: 50
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 0 m_BestFit: 0
m_MinSize: 0 m_MinSize: 0

View File

@ -463,7 +463,7 @@ function this.SetPlayerMountTime(id,validTime)
singData.mountId = id singData.mountId = id
singData.overTime = validTime singData.overTime = validTime
this.userMountList[singData.mountId] = singData this.userMountList[singData.mountId] = singData
this.SetPlayerRideRedPoint(PlayerTitleRideSkinRedPointTypeStr.Ride,0) this.SetPlayerRideRedPoint(PlayerTitleRideSkinRedPointTypeStr.Ride,1)
end end
else--为空时是删除数据 倒计时结束时 else--为空时是删除数据 倒计时结束时
if this.userMountList[id] then if this.userMountList[id] then
@ -574,8 +574,8 @@ function this.SetPlayerRideRedPoint(str,val)
CheckRedPointStatus(RedPointType.Setting_Ride) CheckRedPointStatus(RedPointType.Setting_Ride)
end end
function this.GetPlayerRideRedPoint(str) function this.GetPlayerRideRedPoint(str)
local redPointState = PlayerPrefs.GetInt(PlayerManager.uid..PlayerManager.serverInfo.server_id..PlayerTitleRideSkinRedPointTypeStr.Ride, 0) local redPointState = PlayerPrefs.GetInt(PlayerManager.uid..PlayerManager.serverInfo.server_id..PlayerTitleRideSkinRedPointTypeStr.Ride)
return redPointState == 0 return redPointState == 1
end end
-----------------------------------玩家坐骑 皮肤 称号结束 -----------------------------------玩家坐骑 皮肤 称号结束
function this.GetHeroDataByStar(star,staticid) function this.GetHeroDataByStar(star,staticid)

View File

@ -54,21 +54,7 @@ function SettingPanel:BindEvent()
this.contents[i].view:BindEvent() this.contents[i].view:BindEvent()
end end
this.TabCtrl = TabBox.New()
this.TabCtrl:SetTabAdapter(this.TabAdapter)
this.TabCtrl:SetChangeTabCallBack(this.SwitchView)
this.TabCtrl:Init(this.tabBox, _TabData,funIndex)
-- 绑定红点
local tabList = this.TabCtrl:GetTabList()
for index = 1, #tabList do
local tab = tabList[index]
local redpot = Util.GetGameObject(tab, "Redpot")
if _TabData[index].rpType then
BindRedPointObject(_TabData[index].rpType, redpot)
else
redpot:SetActive(false)
end
end
end end
--添加事件监听(用于子类重写) --添加事件监听(用于子类重写)
@ -88,12 +74,27 @@ end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function SettingPanel:OnOpen(index) function SettingPanel:OnOpen(index)
funIndex = index or 1 funIndex = index or 1
this.TabCtrl = TabBox.New()
this.TabCtrl:SetTabAdapter(this.TabAdapter)
this.TabCtrl:SetChangeTabCallBack(this.SwitchView)
this.TabCtrl:Init(this.tabBox, _TabData,funIndex)
-- 绑定红点
local tabList = this.TabCtrl:GetTabList()
for index = 1, #tabList do
local tab = tabList[index]
local redpot = Util.GetGameObject(tab, "Redpot")
if _TabData[index].rpType then
BindRedPointObject(_TabData[index].rpType, redpot)
else
redpot:SetActive(false)
end
end
end end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写) --界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function SettingPanel:OnShow() -- function SettingPanel:OnShow()
end -- end
-- tab节点显示自定义 -- tab节点显示自定义
function this.TabAdapter(tab, index, status) function this.TabAdapter(tab, index, status)

View File

@ -24,6 +24,7 @@ function SettingPlayerRide:InitComponent(gameObject)
this.goToBtn = Util.GetGameObject(gameObject, "goToBtn") this.goToBtn = Util.GetGameObject(gameObject, "goToBtn")
this.goToBtnText = Util.GetGameObject(gameObject, "goToBtn/Text"):GetComponent("Text") this.goToBtnText = Util.GetGameObject(gameObject, "goToBtn/Text"):GetComponent("Text")
this.stateImg = Util.GetGameObject(gameObject, "stateImg"):GetComponent("Image") this.stateImg = Util.GetGameObject(gameObject, "stateImg"):GetComponent("Image")
this.stateImgGo = Util.GetGameObject(gameObject, "stateImg")
this.lefeTime = Util.GetGameObject(gameObject, "lefeTime"):GetComponent("Text") this.lefeTime = Util.GetGameObject(gameObject, "lefeTime"):GetComponent("Text")
this.setImage = Util.GetGameObject(gameObject, "setImage") this.setImage = Util.GetGameObject(gameObject, "setImage")
@ -70,7 +71,7 @@ end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写) --界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function SettingPlayerRide:OnShow() function SettingPlayerRide:OnShow()
PlayerManager.SetPlayerRideRedPoint(PlayerTitleRideSkinRedPointTypeStr.Ride,1) PlayerManager.SetPlayerRideRedPoint(PlayerTitleRideSkinRedPointTypeStr.Ride,0)
this.ShowPanelData() this.ShowPanelData()
end end
--显示信息 --显示信息
@ -139,8 +140,10 @@ function this.SingleRideClickShowInfo(data,go)
local propertyConfig = ConfigManager.GetConfigData(ConfigName.PropertyConfig, curPlayerHeadIconConfig.UnlockProperty[index][1]) local propertyConfig = ConfigManager.GetConfigData(ConfigName.PropertyConfig, curPlayerHeadIconConfig.UnlockProperty[index][1])
Util.GetGameObject(root, "proValue"):GetComponent("Text").text = GetLanguageStrById(propertyConfig.Info).." ".. GetPropertyFormatStr(propertyConfig.Style, curPlayerHeadIconConfig.UnlockProperty[index][2]) Util.GetGameObject(root, "proValue"):GetComponent("Text").text = GetLanguageStrById(propertyConfig.Info).." ".. GetPropertyFormatStr(propertyConfig.Style, curPlayerHeadIconConfig.UnlockProperty[index][2])
end, not false, not false) end, not false, not false)
this.stateImgGo:SetActive(true)
if not isGet and not isUser then if not isGet and not isUser then
this.goToBtnText.text = "获取途径" this.goToBtnText.text = "获取途径"
this.stateImgGo:SetActive(false)
elseif isGet and not isUser then elseif isGet and not isUser then
this.goToBtnText.text = "骑乘" this.goToBtnText.text = "骑乘"
elseif isGet and isUser then elseif isGet and isUser then