【山河社稷图】

dev_chengFeng
zhangqiang 2021-05-22 15:55:14 +08:00
parent a30616a9fc
commit e404e26ffa
2 changed files with 36 additions and 6 deletions

View File

@ -2597,6 +2597,7 @@ GameObject:
- component: {fileID: 4653628614703019783}
- component: {fileID: 4653628614703019780}
- component: {fileID: 4653628614703019781}
- component: {fileID: 1372956075229272731}
m_Layer: 5
m_Name: prb
m_TagString: Untagged
@ -2672,7 +2673,7 @@ MonoBehaviour:
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Transition: 3
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
@ -2696,6 +2697,25 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!95 &1372956075229272731
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4653628614703019779}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 6ffe000b5a58aac48a9d130543849d76, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!1 &4694875621765882942
GameObject:
m_ObjectHideFlags: 0

View File

@ -11,8 +11,8 @@ local mainLevleBg = {[1] = "s_shanhe_xiaoditu_dabiao",[2] = "s_shanhe_xiaoditu_d
local LevleTitleBg = {[1] = "s_shanhe_xiaoditu_biaoxiamingzidi",[2] = "s_shanhe_xiaoditu_biaoxiamingzidi_01"}
local point = {[1] = "s_shanhe_xiaoditu_xiabao",[2] = "s_shanhe_xiaoditu_xiabao_01"}
local assistantLevleDiBg = {[1] = "s_shanhe_xiaoditu_zhongbiao",[2] = "s_shanhe_xiaoditu_zhongbiao_01"}
local assistantLevleBattle = {[1] = "s_shanhe_xiaoditu_jian",[2] = "s_shanhe_xiaoditu_jian_01"}
local assistantLevleReward = {[1] = "baoxiang-01-1",[2] = "s_shanhe_xiaoditu_baoxiang_01"}
local assistantLevleBattle = {[1] = "s_shanhe_xiaoditu_jian",[2] = "s_shanhe_xiaoditu_jian_01",[3] = "r_jyxz_qizhi_gou"}
local assistantLevleReward = {[1] = "baoxiang-01-1",[2] = "s_shanhe_xiaoditu_baoxiang_01",[3] = "baoxiang-01-2"}
local allSmallPoint = {}
--初始化组件(用于子类重写)
function FightLevelSingleChapterPanel:InitComponent()
@ -45,6 +45,7 @@ function FightLevelSingleChapterPanel:InitComponent()
allSmallPoint = {}
this.pointPre = Util.GetGameObject(self.gameObject, "middle/pointPre")
this.pointParent = Util.GetGameObject(self.gameObject, "middle/pointParent")
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft })
end
--绑定事件(用于子类重写)
@ -74,6 +75,7 @@ end
function FightLevelSingleChapterPanel:OnOpen(_chapterId)
chapterId = _chapterId
-- SoundManager.PlaySound(SoundConfig.Sound_WorldMap)
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main })
end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
@ -199,7 +201,11 @@ function this.SetSingleLevel(levelDatas)
elseif levelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevelReward then--副关卡奖励
prb2:SetActive(true)
prb2:GetComponent("Image").sprite = this.spLoader:LoadSprite(isOpen == 0 and assistantLevleDiBg[1] or assistantLevleDiBg[2])
Util.GetGameObject(prb2, "Icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(isOpen == 0 and assistantLevleReward[1] or assistantLevleReward[2])
local icon = isOpen == 0 and assistantLevleReward[1] or assistantLevleReward[2]
if levelData.state == 1 then
icon = assistantLevleReward[3]
end
Util.GetGameObject(prb2, "Icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(icon)
Util.AddOnceClick(levelList[i], function()
if isOpen == 0 then
if levelData.state == 0 then
@ -221,7 +227,11 @@ function this.SetSingleLevel(levelDatas)
elseif levelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevel then--副关卡战斗
prb3:SetActive(true)
prb3:GetComponent("Image").sprite = this.spLoader:LoadSprite(isOpen == 0 and assistantLevleDiBg[1] or assistantLevleDiBg[2])
Util.GetGameObject(prb3, "Icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(isOpen == 0 and assistantLevleBattle[1] or assistantLevleBattle[2])
local icon = isOpen == 0 and assistantLevleBattle[1] or assistantLevleBattle[2]
if levelData.state == 1 then
icon = assistantLevleBattle[3]
end
Util.GetGameObject(prb3, "Icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(icon)
Util.AddOnceClick(levelList[i], function()
if isOpen == 0 then
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.AssistantLevel,levelData)
@ -390,7 +400,7 @@ end
function FightLevelSingleChapterPanel:OnDestroy()
allMissionDailyBoxItemPres = {}
this.spLoader:Destroy()
SubUIManager.Close(this.UpView)
end
return FightLevelSingleChapterPanel