Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop

dev_chengFeng
ZhangBiao 2020-07-23 15:44:51 +08:00
commit 7fb5ac778f
37 changed files with 2260 additions and 2262 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: 6c4da2d9fdd765046a82908df135dc39
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 65
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 65
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 90ec45784440ef041a29a440f60a7780
vertices: []
indices:
edges: []
weights: []
spritePackingTag: CarbonAtlas
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: 682a7de0ef16f9f45b32245efa7f74b0
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 65
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 65
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: b5b6afe93f8c6d9428fa5a0d8d3234fc
vertices: []
indices:
edges: []
weights: []
spritePackingTag: CarbonAtlas
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -36227,7 +36227,7 @@ GameObject:
- component: {fileID: 5829210635216211838}
- component: {fileID: 1660103616642101012}
m_Layer: 5
m_Name: Text
m_Name: remainTimes
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

View File

@ -4554,7 +4554,7 @@ ParticleSystem:
--- !u!199 &199787422305027156
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -9203,7 +9203,7 @@ ParticleSystem:
--- !u!199 &199651780022285358
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -11585,7 +11585,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &6181894268526856646
RectTransform:
m_ObjectHideFlags: 0
@ -16457,6 +16457,86 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!1 &5203907596944178455
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8058424431263567449}
- component: {fileID: 6735249265126055928}
- component: {fileID: 6102012749895139598}
m_Layer: 5
m_Name: tip
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &8058424431263567449
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5203907596944178455}
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: 3460517663753271504}
m_RootOrder: 7
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: 137}
m_SizeDelta: {x: 600, y: 73.2}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6735249265126055928
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5203907596944178455}
m_CullTransparentMesh: 0
--- !u!114 &6102012749895139598
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5203907596944178455}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ebfe0e44da74fbd44b1b744995de2324, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.93333334, g: 0.7137255, b: 0.3019608, 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: 6fa15837529b0e640af6620b07d3207d, type: 3}
m_FontSize: 30
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 3
m_MaxSize: 46
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u795E\u5C0630 \u7EA7\u53EF\u4E0A\u9635"
LanguageIndex: 10641
--- !u!1 &5247863111868039612
GameObject:
m_ObjectHideFlags: 0
@ -18841,6 +18921,7 @@ RectTransform:
- {fileID: 2849262556332886968}
- {fileID: 1902571392055290900}
- {fileID: 2569408580599364419}
- {fileID: 8058424431263567449}
m_Father: {fileID: 224946850722905528}
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -21039,7 +21120,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &2849262556332886968
RectTransform:
m_ObjectHideFlags: 0

View File

@ -737,7 +737,12 @@ RedPointType = {
Expedition = 9100, --副本界面
Expedition_Treasure = 9101,--天宫秘宝按钮
TimeLimited = 10001 --显示招募
TimeLimited = 10001, --显示招募
Magic_Mirror = 10002, --妖灵宝镜
People_Mirror = 10003, --人杰宝镜
Buddhist_Mirror = 10004, --佛禅宝镜
Taoist_Mirror = 10005 , --道玄宝镜
}
RedPointStatus = {
@ -915,6 +920,7 @@ FORMATION_TYPE = {
SAVE_FORMATION=17,
GUILD_CAR_DELEAY=18,
GUILD_DEATHPOS=19,
XUANYUAN_MIRROR=20,
}
--活动Type定义
@ -1158,7 +1164,11 @@ FUNCTION_OPEN_TYPE = {
DAILYCHALLENGE_EXP=68,--每日经验副本
DAILYCHALLENGE_HERODEBRIS=69,--每日角色碎片副本
DAILYCHALLENGE_TALISMAN=70,--每日法宝副本
DAILYCHALLENGE_SOULPRINT=71,--每日魂印副本
DAILYCHALLENGE_SOULPRINT=71,--每日魂印副本
PEOPLE_MIRROR=74,--人杰宝镜
BUDDHIST_MIRROR=75,--佛禅宝镜
MAGIC_MIRROR=76,--妖灵宝镜
TAOIST_MIRROR=77,--道玄宝镜
}
TaskGetBtnIconDef = {
@ -1335,6 +1345,8 @@ HELP_TYPE = {
TreasureOfHeaven=58,--天宫秘宝
QianKunBox=59,--乾坤宝囊
TreasureResolve=60, --宝物分解
XuanYuanMirror=61,--轩辕宝镜
}
NumToComplexFont = {

View File

@ -165,7 +165,7 @@ local ManagerNames = {
"Guild/DeathPos/DeathPosManager",
--天宫秘宝管理器
"TreasureOfHeaven/TreasureOfHeavenManager",
"Carbon/XuanYuanMirrorManager",
--!!!!红点管理(尽量放在最后)!!!!--

View File

@ -154,6 +154,8 @@ ConfigName = {
TrialGameConfig="TrialGameConfig",
FakeBattle = "FakeBattle",
ArenaBattleReward = "ArenaBattleReward",
RaceTowerConfig = "RaceTowerConfig",
RaceTowerRewardConfig = "RaceTowerRewardConfig",
}
require "Framework/GameDataBase"

View File

@ -319,6 +319,9 @@ UIName = {
EquipSellSelectPopup = 318,--装备分解选择界面
QianKunBoxBuyOnePanel = 319,--乾坤宝囊购买1次
QianKunBoxBuyTenPanel = 320,--乾坤宝囊购买10次
XuanYuanMirrorPanel = 321,--轩辕宝镜界面
XuanYuanMirrorPanelList = 322,--轩辕宝镜单个宝镜界面
CarbonTypePanelV3 = 323,--轩辕宝镜单个宝镜界面
}

View File

@ -3,92 +3,268 @@ CarbonTypePanelV2 = Inherit(BasePanel)
local this = CarbonTypePanelV2
local hasFresh = false
local orginLayer = 0
local type = {
[1] = {
title = "r_Dungeon_tonghefuben",
titlePos = Vector2(0, 1053.333),
titleSize = Vector2(308.8, 66.9),
namePos = Vector2(-300, 0),
nameSize = Vector2(247, 244),
[1] = {
id = FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN, --日常
bg = "r_Dungeon_rendi_01",
name = "r_Dungeon_richangfuben",
live = "lingjijuyuan",
livePos = Vector2(149, 13),
liveSize = Vector2(1024, 1145)
},
[2] = {
id = 1011, --心魔
bg = "r_Dungeon_rendi_02",
name = "r_Dungeon_xinmoshilian",
live = "shixueguimo",
livePos = Vector2(77, -218),
liveSize = Vector2(1024, 1145)
},
[3] = {
id = FUNCTION_OPEN_TYPE.EXPEDITION, --大闹天宫
bg = "r_Dungeon_rendi_03",
name = "r_Dungeon_danaotiangong",
live = "w_wd_boss",
livePos = Vector2(192, 0),
liveSize = Vector2(1024, 1145)
},
[4] = {
id = 46, --车迟斗法
bg = "r_Dungeon_rendi_04",
name = "r_Dungeon_chechidoufa",
live = "m_syjm_0026_png",
livePos = Vector2(334, 32),
liveSize = Vector2(1024, 1145)
},
default = {id = -1,bg = "r_Dungeon_rendi_01"}
},
[2] = {
title = "r_Dungeon_wanxiangjing",
titlePos = Vector2(0, 1075.5),
titleSize = Vector2(293, 90),
namePos = Vector2(-323.01, 0),
nameSize = Vector2(257, 268),
[1] = {
id = 30, --森罗
bg = "r_Dungeon_rendi_03",
name = "r_Dungeon_senluohuanjing",
live = "m_chsm_0035",
livePos = Vector2(274.5, -408.1),
liveSize = Vector2(1612, 1802)
},
default = {id = -1,bg = "r_Dungeon_rendi_01"}
}
}
local carbonType = 0
local carbons = {}
--初始化组件(用于子类重写)
function CarbonTypePanelV2:InitComponent()
this.btnNormal = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/normalRoot") -- 剧情
this.btnLegend = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/trialRoot") -- 无尽
this.btnEpic = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/eliteRoot") -- 试炼
this.btnHero = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/otherRoot") -- 精英
--日常副本
this.dailyCarbonBtn=Util.GetGameObject(self.gameObject,"DailyCarbonBtn")
-- for i = 2, 4 do
-- Util.SetGray(Util.GetGameObject(self.gameObject,"BgRoot/"..i),true)
-- end
-- this.newText = {}
-- -- 四个新图标
-- this.newText = {
-- [CARBON_TYPE.NORMAL] = Util.GetGameObject(this.btnNormal, "Image"),
-- [CARBON_TYPE.ENDLESS] = Util.GetGameObject(this.btnLegend, "Image"),
-- [CARBON_TYPE.TRIAL] = Util.GetGameObject(this.btnEpic, "Image"),
-- [CARBON_TYPE.HERO] = Util.GetGameObject(this.btnHero, "Image"),
-- }
this.dailyCarbonBtn = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/DailyCarbonBtn")
table.insert(carbons, this.dailyCarbonBtn)
this.btnEpic = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/eliteRoot")
table.insert(carbons, this.btnEpic)
this.btnNormal = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/normalRoot")
table.insert(carbons, this.btnNormal)
this.btnLegend = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/trialRoot")
table.insert(carbons, this.btnLegend)
--- 活动开启时间显示
-- this.countTime = Util.GetGameObject(self.gameObject, "btnRoot/circle/Image/time"):GetComponent("Text")
-- this.timerRoot = Util.GetGameObject(self.gameObject, "btnRoot/circle/Image")
this.title = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/title")
this.effect = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect")
this.wind = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect/juneng_chenggong/GameObject")
orginLayer = 0
this.zonghe = Util.GetGameObject(self.gameObject, "BgRoot/GameObject")
this.backBtn = Util.GetGameObject(self.gameObject, "backBtn")
--头像、战力
this.level = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/lvFrame/lv"):GetComponent("Text")
this.playName = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/name"):GetComponent("Text")
this.expSliderValue = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/exp"):GetComponent("Slider")
this.headBox = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox")
this.headPos = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/headpos")
this.headRedpot = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/redpot")
this.teamPower = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/powerBtn/value"):GetComponent("Text")
this.BtView = SubUIManager.Open(SubUIConfig.BtView, self.gameObject.transform)
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform)
this.level = Util.GetGameObject(this.zonghe, "LeftUp/headBox/lvFrame/lv"):GetComponent("Text")
this.playName = Util.GetGameObject(this.zonghe, "LeftUp/headBox/name"):GetComponent("Text")
this.expSliderValue = Util.GetGameObject(this.zonghe, "LeftUp/headBox/exp"):GetComponent("Slider")
this.headBox = Util.GetGameObject(this.zonghe, "LeftUp/headBox")
this.headPos = Util.GetGameObject(this.zonghe, "LeftUp/headBox/headpos")
this.headRedpot = Util.GetGameObject(this.zonghe, "LeftUp/headBox/redpot")
this.teamPower = Util.GetGameObject(this.zonghe, "LeftUp/powerBtn/value"):GetComponent("Text")
-- 特权
this.vipPrivilegeBtn = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/vipPrivilege/vipPrivilegeBtn")
this.vipPrivilegeBtn = Util.GetGameObject(this.zonghe, "LeftUp/vipPrivilege/vipPrivilegeBtn")
this.vipLevelText = Util.GetGameObject(this.vipPrivilegeBtn, "bg/vip"):GetComponent("Image")
this.vipRedPoint = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/vipPrivilege/redPoint")
this.vipRedPoint = Util.GetGameObject(this.zonghe, "LeftUp/vipPrivilege/redPoint")
screenAdapte(this.vipPrivilegeBtn)
this.AnimRoot = Util.GetGameObject(self.gameObject, "btnRoot/circle/root")
end
this.BtView = SubUIManager.Open(SubUIConfig.BtView, self.gameObject.transform)
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform)
end
local index = 1
--绑定事件(用于子类重写)
function CarbonTypePanelV2:BindEvent()
BindRedPointObject(RedPointType.VipPrivilege, this.vipRedPoint)
Util.AddClick(
this.backBtn,
function()
this:ClosePanel()
end
)
-- BindRedPointObject(RedPointType.OrdinaryExplore, Util.GetGameObject(this.btnNormal, "redPoint"))
-- BindRedPointObject(RedPointType.EpicExplore, Util.GetGameObject(this.btnEpic, "redPoint"))
-- BindRedPointObject(RedPointType.HeroExplore, Util.GetGameObject(this.btnHero, "redPoint"))
-- BindRedPointObject(RedPointType.LegendExplore, Util.GetGameObject(this.btnLegend, "redPoint"))
-- 点击你的猪头
Util.AddClick(
this.headBox,
function()
UIManager.OpenPanel(UIName.SettingPanel)
end
)
BindRedPointObject(RedPointType.Setting, this.headRedpot)
-- 剧情副本(现改为猎妖之路)
Util.AddClick(this.btnNormal, function()
-- if ActTimeCtrlManager.SingleFuncState(17) then
-- CarbonManager.difficulty = 1
-- local jumpCarbonId = CarbonManager.NeedLockId(100, 1)
-- UIManager.OpenPanel(UIName.PlotCarbonPanel, jumpCarbonId)
-- CheckRedPointStatus(RedPointType.NormalExplore_OpenMap)
-- this.RefreshOpenText(CARBON_TYPE.NORMAL, FUNCTION_OPEN_TYPE.NORMALCARBON)
-- FunctionOpenMananger.CleadNewText( FUNCTION_OPEN_TYPE.NORMALCARBON)
-- else
-- PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip( FUNCTION_OPEN_TYPE.NORMALCARBON))
-- end
Util.AddClick(
this.vipPrivilegeBtn,
function()
UIManager.OpenPanel(UIName.VipPanelV2)
end
)
end
--添加事件监听(用于子类重写)
function CarbonTypePanelV2:AddListener()
end
--移除事件监听(用于子类重写)
function CarbonTypePanelV2:RemoveListener()
end
--副本类型 1 综合 2 万象
function CarbonTypePanelV2:OnOpen(_type)
carbonType = _type
LogBlue("carbonType1:"..carbonType)
if carbonType == 1 then
-- 清除一下选得副本类型
CarbonManager.difficulty = 0
this.BtView.gameObject:SetActive(true)
this.BtView:OnOpen({sortOrder = self.sortingOrder, panelType = PanelTypeView.Carbon})
this.UpView:OnOpen({showType = UpViewOpenType.ShowRight, panelType = PanelType.Main})
elseif carbonType == 2 then
this.BtView.gameObject:SetActive(false)
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main })
else
-- 清除一下选得副本类型
CarbonManager.difficulty = 0
this.BtView.gameObject:SetActive(true)
this.BtView:OnOpen({sortOrder = self.sortingOrder, panelType = PanelTypeView.Carbon})
this.UpView:OnOpen({showType = UpViewOpenType.ShowRight, panelType = PanelType.Main})
end
end
--界面打开时调用(用于子类重写)
function CarbonTypePanelV2:OnShow(...)
this.title:GetComponent("Image").sprite = Util.LoadSprite(type[carbonType].title)
this.title:GetComponent("RectTransform").localPosition = type[carbonType].titlePos
this.title:GetComponent("RectTransform").sizeDelta = type[carbonType].titleSize
if carbonType == 1 then
this.zonghe.gameObject:SetActive(true)
this.backBtn.gameObject:SetActive(false)
this.FreshPlayerInfo()
this.SetPlayerHead()
elseif carbonType == 2 then
this.zonghe.gameObject:SetActive(false)
this.backBtn.gameObject:SetActive(true)
else
this.zonghe.gameObject:SetActive(true)
this.backBtn.gameObject:SetActive(false)
this.FreshPlayerInfo()
this.SetPlayerHead()
end
this.UpdateCarbonContent()
-- 音效
SoundManager.PlayMusic(SoundConfig.BGM_Carbon)
-- 播放动画
-- CarbonTypePanelV2:PlayAni()
CarbonManager.GetMissionLevelData()
this.PlayScaleAnim()
end
function this.UpdateCarbonContent()
if not carbons then
return
end
for k,v in ipairs(carbons) do
local data
if not type[carbonType][k] then
data = type[carbonType].default
else
data = type[carbonType][k]
end
Util.GetGameObject(v, "bg"):GetComponent("Image").sprite = Util.LoadSprite(data.bg)
local live = Util.GetGameObject(v, "bg/Live")
local name = Util.GetGameObject(v, "bg/Name")
if data.id == -1 then
live.gameObject:SetActive(false)
name.gameObject:SetActive(false)
Util.GetGameObject(v, "bg/Text").gameObject:SetActive(true)
v:GetComponent("Button").enabled = false
else
live.gameObject:SetActive(true)
name.gameObject:SetActive(true)
Util.GetGameObject(v, "bg/Text").gameObject:SetActive(false)
live:GetComponent("Image").sprite = Util.LoadSprite(data.live)
live:GetComponent("RectTransform").localPosition = data.livePos
live:GetComponent("RectTransform").sizeDelta = data.liveSize
name:GetComponent("Image").sprite = Util.LoadSprite(data.name)
name:GetComponent("RectTransform").localPosition = type[carbonType].namePos
name:GetComponent("RectTransform").sizeDelta = type[carbonType].nameSize
v:GetComponent("Button").enabled = true
Util.AddOnceClick(v,function()
this.BtnClick(data.id)
end)
end
if data.id == -1 then
Util.SetGray(v,true)
elseif data.id == 1011 then
Util.SetGray(v,not ActTimeCtrlManager.SingleFuncState(30))
else
Util.SetGray(v,not ActTimeCtrlManager.SingleFuncState(data.id))
end
end
end
function this.BtnClick(id)
if id == FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN then
if ActTimeCtrlManager.SingleFuncState(67) == false then --如果未解锁
PopupTipPanel.ShowTip(ActTimeCtrlManager.SystemOpenTip(FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN))
return
end
UIManager.OpenPanel(UIName.DailyCarbonPanel)
elseif id == 1011 then
JumpManager.GoJump(1011)
elseif id == FUNCTION_OPEN_TYPE.EXPEDITION then
if ActTimeCtrlManager.SingleFuncState(JumpType.Expedition) then
if #ExpeditionManager.nodeInfo <= 0 then
if ExpeditionManager.expeditionLeve == -1 then
NetManager.GetExpeditionRequest(2,function()
JumpManager.GoJump(64001)
end)
NetManager.GetExpeditionRequest(
2,
function()
JumpManager.GoJump(64001)
end
)
else
NetManager.GetExpeditionRequest(ExpeditionManager.expeditionLeve,function()
JumpManager.GoJump(64001)
end)
NetManager.GetExpeditionRequest(
ExpeditionManager.expeditionLeve,
function()
JumpManager.GoJump(64001)
end
)
end
else
JumpManager.GoJump(64001)
@ -100,117 +276,35 @@ function CarbonTypePanelV2:BindEvent()
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.EXPEDITION))
end
end
end)
-- 试炼副本(暂时改为心魔试练。原锁妖塔;兽潮来袭)
Util.AddClick(this.btnEpic, function()
JumpManager.GoJump(1011)
-- if ActTimeCtrlManager.SingleFuncState(30) then
-- CarbonManager.difficulty = 2
-- UIManager.OpenPanel(UIName.TrialCarbonPanel)
-- RedPointManager.PlayerPrefsSetStr(PlayerManager.uid .. "Trial", 1)
-- CheckRedPointStatus(RedPointType.EpicExplore_OpenCarbon)
-- this.RefreshOpenText(CARBON_TYPE.TRIAL, FUNCTION_OPEN_TYPE.TRIAL)
-- FunctionOpenMananger.CleadNewText(FUNCTION_OPEN_TYPE.TRIAL)
-- else
-- PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.TRIAL))
-- end
end)
-- 英雄副本
Util.AddClick(this.btnHero, function()
if ActTimeCtrlManager.SingleFuncState(18) then
CarbonManager.difficulty = 3
UIManager.OpenPanel(UIName.EliteCarbonPanel)
CheckRedPointStatus(RedPointType.HeroExplore_OpenMap)
this.RefreshOpenText(CARBON_TYPE.HERO, FUNCTION_OPEN_TYPE.ELITE)
FunctionOpenMananger.CleadNewText(FUNCTION_OPEN_TYPE.ELITE)
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.ELITE))
end
end)
-- 无尽副本(暂时改为车迟斗法)
Util.AddClick(this.btnLegend, function()
elseif id == 46 then
if PlayerManager.familyId == 0 then
PopupTipPanel.ShowTip(Language[10327])
return
end
UIManager.OpenPanel(UIName.GuildCarDelayMainPanel)
-- this.newText[CARBON_TYPE.ENDLESS]:SetActive(false)
-- FunctionOpenMananger.CleadNewText(FUNCTION_OPEN_TYPE.ENDLESS)
elseif id == 30 then
if ActTimeCtrlManager.SingleFuncState(30) then
CarbonManager.difficulty = 2
local trialDataConfig = ConfigManager.GetConfig(ConfigName.TrialConfig)
-- if not ActTimeCtrlManager.SingleFuncState(46) then
-- PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.ENDLESS))
-- return
-- end
-- CarbonManager.difficulty = 4
-- UIManager.OpenPanel(UIName.EndLessCarbonPanel)
-- this.RefreshOpenText(CARBON_TYPE.ENDLESS, FUNCTION_OPEN_TYPE.ENDLESS)
end)
--日常副本
Util.AddClick(this.dailyCarbonBtn,function()
if ActTimeCtrlManager.SingleFuncState(67)==false then--如果未解锁
PopupTipPanel.ShowTip(ActTimeCtrlManager.SystemOpenTip(FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN))
return
if MapTrialManager.curTowerLevel > 10000 then
MapManager.curMapId = MapTrialManager.GetSurprisedLevelMapId()
else
MapManager.curMapId = trialDataConfig[MapTrialManager.curTowerLevel].MapId
end
NetManager.MapInfoRequest(MapManager.curMapId, FormationTypeDef.FORMATION_DREAMLAND, function(msg)
MapManager.isReloadEnter = false
MapTrialManager.firstEnter = true
MapManager.SetViewSize(20)--设置视野范围(明雷形式)
MapManager.curAreaId =FormationTypeDef.FORMATION_DREAMLAND
MapManager.trialHeroInfo=msg.infos
SwitchPanel.OpenPanel(UIName.MapPanel)
end)
LogBlue(Language[11163])
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.TRIAL))
end
UIManager.OpenPanel(UIName.DailyCarbonPanel)
end)
-- 点击你的猪头
Util.AddClick(this.headBox, function ()
UIManager.OpenPanel(UIName.SettingPanel)
end)
BindRedPointObject(RedPointType.Setting, this.headRedpot)
Util.AddClick(this.vipPrivilegeBtn, function()
UIManager.OpenPanel(UIName.VipPanelV2)
end)
end
--添加事件监听(用于子类重写)
function CarbonTypePanelV2:AddListener()
-- Game.GlobalEvent:AddEvent(GameEvent.FunctionCtrl.OnFunctionOpen, this.FreshIconShow)--原无尽5点刷新相关 暂时不用了
-- Game.GlobalEvent:AddEvent(GameEvent.FunctionCtrl.OnFunctionClose, this.FreshIconShow)
end
--移除事件监听(用于子类重写)
function CarbonTypePanelV2:RemoveListener()
-- Game.GlobalEvent:RemoveEvent(GameEvent.FunctionCtrl.OnFunctionOpen, this.FreshIconShow)
-- Game.GlobalEvent:RemoveEvent(GameEvent.FunctionCtrl.OnFunctionClose, this.FreshIconShow)
end
function CarbonTypePanelV2:OnOpen()
-- 清除一下选得副本类型
CarbonManager.difficulty = 0
CheckRedPointStatus(RedPointType.EpicExplore_GetReward)
this.BtView:OnOpen({ sortOrder = self.sortingOrder, panelType = PanelTypeView.Carbon })
this.UpView:OnOpen({ showType = UpViewOpenType.ShowRight, panelType = PanelType.Main })
end
--界面打开时调用(用于子类重写)
function CarbonTypePanelV2:OnShow(...)
Util.SetGray(this.btnNormal, not ActTimeCtrlManager.SingleFuncState(17))
Util.SetGray(this.btnEpic, not ActTimeCtrlManager.SingleFuncState(30))
Util.SetGray(this.btnHero, not ActTimeCtrlManager.SingleFuncState(18))
Util.SetGray(this.btnLegend, not ActTimeCtrlManager.SingleFuncState(46))
Util.SetGray(this.dailyCarbonBtn,not ActTimeCtrlManager.SingleFuncState(67))
-- 音效
SoundManager.PlayMusic(SoundConfig.BGM_Carbon)
-- 播放动画
-- CarbonTypePanelV2:PlayAni()
CarbonManager.GetMissionLevelData()
this.FreshPlayerInfo()
this.SetPlayerHead()
this.SetOpenText()
this.PlayScaleAnim()
end
end
@ -232,24 +326,6 @@ function this.SetPlayerHead()
this.playerHead:SetFrame(PlayerManager.frame)
this.playerHead:SetScale(Vector3.one * 0.9)
this.playerHead:SetPosition(Vector3.New(-5, 0, 0))
end
--- 设置时候显示新字
----@param btnCarbon 副本类型按钮
function this.SetNewTextShow(btnCarbon, state)
-- for i, v in pairs(this.newText) do
-- if i == carbonType then
-- v:SetActive(state)
-- end
-- end
if btnCarbon then
local textGo = Util.GetGameObject(btnCarbon.transform, "Image")
if textGo then
textGo:SetActive(state)
end
end
end
function this:OnSortingOrderChange()
@ -258,35 +334,28 @@ function this:OnSortingOrderChange()
Util.AddParticleSortLayer(this.vipPrivilegeBtn, self.sortingOrder - orginLayer)
orginLayer = self.sortingOrder
this.BtView:SetOrderStatus({ sortOrder = self.sortingOrder })
if carbonType == 1 then
this.BtView.gameObject:SetActive(true)
this.BtView:SetOrderStatus({sortOrder = self.sortingOrder})
elseif carbonType == 2 then
this.BtView.gameObject:SetActive(false)
else
end
end
function CarbonTypePanelV2:PlayAni()
-- 玩家没有资格开启
-- this.timerRoot:SetActive(false)
-- if not ActTimeCtrlManager.IsQualifiled(46) then
-- return
-- end
-- 启动定时器
-- this.StartCountTime()
-- 开门音效
if not this.isPlayDoorAudio then
this.isPlayDoorAudio = true
Timer.New(function ()
if this.isPlayDoorAudio then
SoundManager.PlaySound(SoundConfig.Sound_Door)
end
end, 1.3):Start()
Timer.New(
function()
if this.isPlayDoorAudio then
SoundManager.PlaySound(SoundConfig.Sound_Door)
end
end,
1.3
):Start()
end
-- 动画播放完才显示时间
-- Timer.New(function ()
-- this.timerRoot:SetActive(true)
-- end, 2.5):Start()
end
function this.PlayScaleAnim()
@ -298,60 +367,6 @@ function this.PlayScaleAnim()
end
end
-- 选择类型
function this.ChooseCarbonType(type)
CarbonManager.difficulty = type
end
-- function this.StartCountTime()
-- this.countTime.text = ""
-- if this.timer then
-- this.timer:Stop()
-- this.timer = nil
-- end
-- local freshTime = 0
-- local isOpen = false
-- local str = ""
-- local serData = ActTimeCtrlManager.GetSerDataByTypeId(46)
-- if not ActTimeCtrlManager.FuncTimeJudge(46) then
-- freshTime = serData.startTime
-- isOpen = false
-- str = "距离开启"
-- else
-- freshTime = serData.endTime
-- isOpen = true
-- str = "距离结束"
-- end
-- hasFresh = false
-- if not this.timer then
-- this.timer = Timer.New(function()
-- if not this.timer or not this.countTime then
-- return
-- end
-- this.countTime.text = str .. FormatSecond(freshTime - PlayerManager.serverTime)
-- end, 1, -1, true)
-- this.timer:Start()
-- end
-- end
-- function this.FreshIconShow(id)
-- if not hasFresh then
-- hasFresh = true
-- this.refreshTimer = nil
-- this.refreshTimer = Timer.New(function ()
-- Util.SetGray(this.btnLegend, not ActTimeCtrlManager.SingleFuncState(46))
-- this.StartCountTime()
-- end, 1)
-- this.refreshTimer:Start()
-- end
-- end
--界面关闭时调用(用于子类重写)
function CarbonTypePanelV2:OnClose()
if this.timer then
@ -359,38 +374,19 @@ function CarbonTypePanelV2:OnClose()
this.timer = nil
end
if this.refreshTimer then
if this.refreshTimer then
this.refreshTimer:Stop()
this.refreshTimer = nil
end
this.isPlayDoorAudio = false
end
function this.SetOpenText()
-- this.newText[CARBON_TYPE.NORMAL]:SetActive(FunctionOpenMananger.GetModuleOpen(17))
-- this.newText[CARBON_TYPE.ENDLESS]:SetActive(FunctionOpenMananger.GetModuleOpen(46))
-- this.newText[CARBON_TYPE.TRIAL]:SetActive(FunctionOpenMananger.GetModuleOpen(30))
-- this.newText[CARBON_TYPE.HERO]:SetActive(FunctionOpenMananger.GetModuleOpen(18))
end
-- 刷新显示
function this.RefreshOpenText(carbonType, openId)
-- this.newText[carbonType]:SetActive(FunctionOpenMananger.GetModuleOpen(openId))
this.BtView:InitNewOpenShow()
end
--界面销毁时调用(用于子类重写)
function CarbonTypePanelV2:OnDestroy()
-- ClearRedPointObject(RedPointType.OrdinaryExplore)
-- ClearRedPointObject(RedPointType.HeroExplore)
-- ClearRedPointObject(RedPointType.EpicExplore)
-- ClearRedPointObject(RedPointType.LegendExplore)
-- ClearRedPointObject(RedPointType.Setting, this.headRedpot)
-- ClearRedPointObject(RedPointType.VipPrivilege, this.vipRedPoint)
hasFresh = false
if this.BtView then
SubUIManager.Close(this.BtView)
SubUIManager.Close(this.UpView)
end
end
return CarbonTypePanelV2
return CarbonTypePanelV2

View File

@ -0,0 +1,127 @@
require("Base/BasePanel")
CarbonTypePanelV3 = Inherit(BasePanel)
local this = CarbonTypePanelV3
local hasFresh = false
local orginLayer = 0
--初始化组件(用于子类重写)
function CarbonTypePanelV3:InitComponent()
this.btnSenro = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/DailyCarbonBtn") -- 森罗
this.btnXuanyuan = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/eliteRoot") -- 轩辕
Util.GetGameObject(self.gameObject, "btnRoot/circle/root/normalRoot"):SetActive(false)
Util.GetGameObject(self.gameObject, "btnRoot/circle/root/trialRoot"):SetActive(false)
this.effect = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect")
this.wind = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect/juneng_chenggong/GameObject")
orginLayer = 0
--头像、战力
this.level = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/lvFrame/lv"):GetComponent("Text")
this.playName = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/name"):GetComponent("Text")
this.expSliderValue = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/exp"):GetComponent("Slider")
this.headBox = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox")
this.headPos = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/headpos")
this.headRedpot = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/redpot")
this.teamPower = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/powerBtn/value"):GetComponent("Text")
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform)
-- 特权
this.vipPrivilegeBtn = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/vipPrivilege/vipPrivilegeBtn")
this.vipLevelText = Util.GetGameObject(this.vipPrivilegeBtn, "bg/vip"):GetComponent("Image")
this.vipRedPoint = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/vipPrivilege/redPoint")
screenAdapte(this.vipPrivilegeBtn)
this.AnimRoot = Util.GetGameObject(self.gameObject, "btnRoot/circle/root")
end
local index = 1
--绑定事件(用于子类重写)
function CarbonTypePanelV3:BindEvent()
BindRedPointObject(RedPointType.VipPrivilege, this.vipRedPoint)
-- 森罗
Util.AddClick(this.btnSenro, function()
end)
-- 轩辕
Util.AddClick(this.btnXuanyuan, function()
UIManager.OpenPanel(UIName.XuanYuanMirrorPanel)
end)
Util.AddClick(this.headBox, function ()
UIManager.OpenPanel(UIName.SettingPanel)
end)
BindRedPointObject(RedPointType.Setting, this.headRedpot)
Util.AddClick(this.vipPrivilegeBtn, function()
UIManager.OpenPanel(UIName.VipPanelV2)
end)
end
function CarbonTypePanelV3:OnOpen()
this.UpView:OnOpen({ showType = UpViewOpenType.ShowRight, panelType = PanelType.Main })
end
--界面打开时调用(用于子类重写)
function CarbonTypePanelV3:OnShow(...)
-- 音效
SoundManager.PlayMusic(SoundConfig.BGM_Carbon)
-- 播放动画
this.FreshPlayerInfo()
this.SetPlayerHead()
this.PlayScaleAnim()
end
-- 刷新玩家信息显示
function this.FreshPlayerInfo()
this.vipLevelText.sprite = VipManager.SetVipLevelImg()
this.level.text = PlayerManager.level
this.expSliderValue.value = PlayerManager.exp / PlayerManager.userLevelData[PlayerManager.level].Exp
this.playName.text = PlayerManager.nickName
this.teamPower.text = FormationManager.GetFormationPower(FormationManager.curFormationIndex)
end
-- 设置头像
function this.SetPlayerHead()
if not this.playerHead then
this.playerHead = SubUIManager.Open(SubUIConfig.PlayerHeadView, this.headPos.transform)
end
this.playerHead:SetHead(PlayerManager.head)
this.playerHead:SetFrame(PlayerManager.frame)
this.playerHead:SetScale(Vector3.one * 0.9)
this.playerHead:SetPosition(Vector3.New(-5, 0, 0))
end
function this:OnSortingOrderChange()
Util.AddParticleSortLayer(this.effect, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.wind, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.vipPrivilegeBtn, self.sortingOrder - orginLayer)
orginLayer = self.sortingOrder
end
function this.PlayScaleAnim()
local isOpen = FunctionOpenMananger.GetRootState(PanelTypeView.Carbon)
if isOpen then
PlayUIAnim(this.AnimRoot)
else
PlayUIAnimBack(this.AnimRoot)
end
end
--界面关闭时调用(用于子类重写)
function CarbonTypePanelV3:OnClose()
end
--界面销毁时调用(用于子类重写)
function CarbonTypePanelV3:OnDestroy()
hasFresh = false
SubUIManager.Close(this.UpView)
end
return CarbonTypePanelV3

View File

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

View File

@ -50,7 +50,7 @@ function EndLessCarbonPanel:BindEvent()
Util.AddClick(this.btnBack, function ()
-- !!!! PS: 这里必须是主动打开副本选择界面,从地图中返回时,这个界面的上一级是地图界面,
-- 如果只是关闭自己,则会打开地图界面,不会打开副本选择界面,导致报错
UIManager.OpenPanel(UIName.CarbonTypePanelV2)
UIManager.OpenPanel(UIName.CarbonTypePanelV2,1)
--检测到上一个面板打开之后,关闭自己
CallBackOnPanelOpen(UIName.CarbonTypePanelV2, function()

View File

@ -84,7 +84,7 @@ function PlotCarbonPanel:BindEvent()
ClearRedPointObject(RedPointType.EpicExplore_GetReward)
-- !!!! PS: 这里必须是主动打开副本选择界面,从地图中返回时,这个界面的上一级是地图界面,
-- 如果只是关闭自己,则会打开地图界面,不会打开副本选择界面,导致报错
UIManager.OpenPanel(UIName.CarbonTypePanelV2)
UIManager.OpenPanel(UIName.CarbonTypePanelV,1)
CallBackOnPanelOpen(UIName.CarbonTypePanelV2, function()
UIManager.ClosePanel(UIName.PlotCarbonPanel)
end)

View File

@ -51,7 +51,7 @@ function TrialCarbonPanel:BindEvent()
ClearRedPointObject(RedPointType.EpicExplore_GetReward)
-- !!!! PS: 这里必须是主动打开副本选择界面,从地图中返回时,这个界面的上一级是地图界面,
-- 如果只是关闭自己,则会打开地图界面,不会打开副本选择界面,导致报错
UIManager.OpenPanel(UIName.CarbonTypePanelV2)
UIManager.OpenPanel(UIName.CarbonTypePanelV2,1)
CallBackOnPanelOpen(UIName.CarbonTypePanelV2, function()
UIManager.ClosePanel(UIName.TrialCarbonPanel)
end)

View File

@ -0,0 +1,95 @@
XuanYuanMirrorManager = {};
local raceTowerConfig = ConfigManager.GetConfig(ConfigName.RaceTowerConfig)
local raceTowerRewardConfig = ConfigManager.GetConfig(ConfigName.RaceTowerRewardConfig)
local this = XuanYuanMirrorManager
local levelData = {}
function this.Initialize()
this.InitMirrorData()
end
--前端表
function this.GetMirrorData(_type)
_type = _type - 73
if levelData[_type] then
return levelData[_type]
end
end
function this.InitMirrorData()
levelData = {}
for k,v in ipairs(raceTowerConfig) do
if not levelData[v.Type] then
levelData[v.Type] = {}
end
local data={}
data.id = v.Id
data.type = v.Type
data.openRules = v.OpenRules
data.difficulity = v.Quality
data.monsterId = v.MonsterId
LogGreen("v.TeamRules:"..#v.TeamRules)
data.teamRules = v.TeamRules
data.condition = string.format("需要上阵%s名%s系神将",data.teamRules[1][2],this.PropertyName(data.teamRules[1][1]))
data.power = v.FightForce
data.rewardList = {}
--概率奖励
local tempConfig = ConfigManager.GetConfigData(ConfigName.RewardGroup,v.Reward)
LogGreen("ShowItem:"..#tempConfig.ShowItem)
for i=1, #tempConfig.ShowItem do
table.insert(data.rewardList,{id = tempConfig.ShowItem[i][1],num = tempConfig.ShowItem[i][2],israte = true})
end
--扫荡奖励
LogGreen("RewardView:"..#v.RewardView)
for i=1, #v.RewardView do
table.insert(data.rewardList,{id = v.RewardView[i][1],num = v.RewardView[i][2]})
end
--首通奖励
tempConfig = ConfigManager.GetConfigData(ConfigName.RewardGroup,v.FirstReward)
LogGreen("ShowItem:"..#tempConfig.ShowItem)
for i=1, #tempConfig.ShowItem do
table.insert(data.rewardList,{id = tempConfig.ShowItem[i][1],num = tempConfig.ShowItem[i][2],isFirst = true})
end
data.state = -1
table.insert(levelData[v.Type],data)
end
end
function this.UpdateState()
end
function this.PropertyName(_type)
_type = tonumber(_type)
if _type == 1 then
return ""
elseif _type == 2 then
return ""
elseif _type == 3 then
return ""
elseif _type == 4 then
return ""
else
return ""
end
end
function this.GetState(_type,id)
return -1
end
function this.GetRewardView()
local dataList = {}
for k,v in pairs(raceTowerRewardConfig) do
local data = {}
if v.Section[1] == v.Section[2] then
data.rank = v.Section[1]
elseif v.Section[2] ~= -1 then
data.rank = v.Section[1] - v.Section[2]
else
end
end
end
return this

View File

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

View File

@ -1,247 +1,120 @@
require("Base/BasePanel")
CarbonTypePanel = Inherit(BasePanel)
local this = CarbonTypePanel
XuanYuanMirrorPanel = Inherit(BasePanel)
local this = XuanYuanMirrorPanel
local hasFresh = false
local orginLayer = 0
--初始化组件(用于子类重写)
function CarbonTypePanel:InitComponent()
function this:InitComponent()
--this.btnBack:SetActive(false)
this.btnNormal = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/normalRoot") -- 剧情
this.btnLegend = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/trialRoot") -- 无尽
this.btnEpic = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/eliteRoot") -- 试炼
this.btnHero = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/otherRoot") -- 精英
this.btnYaoling = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/yaolingbaojing") -- 妖灵
this.btnRenjie = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/renjiebaojing") -- 人杰
this.btnFochan = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/fuochanbaojing") -- 佛禅
this.btnDaoxuan = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/daoxuanbaojing") -- 道玄
this.newText = {}
-- 四个新图标
this.newText = {
[CARBON_TYPE.NORMAL] = Util.GetGameObject(this.btnNormal, "Image"),
[CARBON_TYPE.ENDLESS] = Util.GetGameObject(this.btnLegend, "Image"),
[CARBON_TYPE.TRIAL] = Util.GetGameObject(this.btnEpic, "Image"),
[CARBON_TYPE.HERO] = Util.GetGameObject(this.btnHero, "Image"),
}
--- 活动开启时间显示
this.countTime = Util.GetGameObject(self.gameObject, "btnRoot/circle/Image/time"):GetComponent("Text")
this.timerRoot = Util.GetGameObject(self.gameObject, "btnRoot/circle/Image")
this.btnHelp = Util.GetGameObject(self.gameObject, "btnRoot/btnhelp")
this.helpPosition = this.btnHelp:GetComponent("RectTransform").localPosition
this.btnRank = Util.GetGameObject(self.gameObject, "btnRoot/btnRank")
this.btnReward = Util.GetGameObject(self.gameObject, "btnRoot/btnReward")
this.btnClose = Util.GetGameObject(self.gameObject, "btnRoot/btnBack")
this.remainTimes = Util.GetGameObject(self.gameObject, "remainTimes") :GetComponent("Text")
this.effect = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect")
this.wind = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect/juneng_chenggong/GameObject")
orginLayer = 0
--头像、战力
this.level = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/lvFrame/lv"):GetComponent("Text")
this.playName = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/name"):GetComponent("Text")
this.expSliderValue = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/exp"):GetComponent("Slider")
this.headBox = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox")
this.headPos = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/headpos")
this.headRedpot = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/redpot")
this.teamPower = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/powerBtn/value"):GetComponent("Text")
this.BtView = SubUIManager.Open(SubUIConfig.BtView, self.gameObject.transform)
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform)
-- 特权
this.vipPrivilegeBtn = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/vipPrivilege/vipPrivilegeBtn")
this.vipLevelText = Util.GetGameObject(this.vipPrivilegeBtn, "bg/vip"):GetComponent("Image")
this.vipRedPoint = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/vipPrivilege/redPoint")
screenAdapte(this.vipPrivilegeBtn)
this.AnimRoot = Util.GetGameObject(self.gameObject, "btnRoot/circle/root")
--日常副本
this.dailyCarbonBtn=Util.GetGameObject(self.gameObject,"DailyCarbonBtn")
BindRedPointObject(RedPointType.Magic_Mirror, Util.GetGameObject(this.btnYaoling, "redPoint"))
BindRedPointObject(RedPointType.People_Mirror, Util.GetGameObject(this.btnRenjie, "redPoint"))
BindRedPointObject(RedPointType.Buddhist_Mirror, Util.GetGameObject(this.btnFochan, "redPoint"))
BindRedPointObject(RedPointType.Taoist_Mirror, Util.GetGameObject(this.btnDaoxuan, "redPoint"))
end
local index = 1
--绑定事件(用于子类重写)
function CarbonTypePanel:BindEvent()
BindRedPointObject(RedPointType.VipPrivilege, this.vipRedPoint)
BindRedPointObject(RedPointType.OrdinaryExplore, Util.GetGameObject(this.btnNormal, "redPoint"))
BindRedPointObject(RedPointType.EpicExplore, Util.GetGameObject(this.btnEpic, "redPoint"))
BindRedPointObject(RedPointType.HeroExplore, Util.GetGameObject(this.btnHero, "redPoint"))
BindRedPointObject(RedPointType.LegendExplore, Util.GetGameObject(this.btnLegend, "redPoint"))
-- 普通副本
Util.AddClick(this.btnNormal, function()
if ActTimeCtrlManager.SingleFuncState(17) then
CarbonManager.difficulty = 1
local jumpCarbonId = CarbonManager.NeedLockId(100, 1)
UIManager.OpenPanel(UIName.PlotCarbonPanel, jumpCarbonId)
CheckRedPointStatus(RedPointType.NormalExplore_OpenMap)
this.RefreshOpenText(CARBON_TYPE.NORMAL, FUNCTION_OPEN_TYPE.NORMALCARBON)
FunctionOpenMananger.CleadNewText( FUNCTION_OPEN_TYPE.NORMALCARBON)
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip( FUNCTION_OPEN_TYPE.NORMALCARBON))
end
function this:BindEvent()
Util.AddClick(this.btnYaoling, function()
this:BtnAction(FUNCTION_OPEN_TYPE.MAGIC_MIRROR)
end)
-- 试炼副本
Util.AddClick(this.btnEpic, function()
if ActTimeCtrlManager.SingleFuncState(30) then
CarbonManager.difficulty = 2
UIManager.OpenPanel(UIName.TrialCarbonPanel)
RedPointManager.PlayerPrefsSetStr(PlayerManager.uid .. "Trial", 1)
CheckRedPointStatus(RedPointType.EpicExplore_OpenCarbon)
this.RefreshOpenText(CARBON_TYPE.TRIAL, FUNCTION_OPEN_TYPE.TRIAL)
FunctionOpenMananger.CleadNewText(FUNCTION_OPEN_TYPE.TRIAL)
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.TRIAL))
end
Util.AddClick(this.btnRenjie, function()
this:BtnAction(FUNCTION_OPEN_TYPE.PEOPLE_MIRROR)
end)
-- 英雄副本
Util.AddClick(this.btnHero, function()
if ActTimeCtrlManager.SingleFuncState(18) then
CarbonManager.difficulty = 3
UIManager.OpenPanel(UIName.EliteCarbonPanel)
CheckRedPointStatus(RedPointType.HeroExplore_OpenMap)
this.RefreshOpenText(CARBON_TYPE.HERO, FUNCTION_OPEN_TYPE.ELITE)
FunctionOpenMananger.CleadNewText(FUNCTION_OPEN_TYPE.ELITE)
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.ELITE))
end
Util.AddClick(this.btnFochan, function()
this:BtnAction(FUNCTION_OPEN_TYPE.BUDDHIST_MIRROR)
end)
-- 无尽副本
Util.AddClick(this.btnLegend, function()
this.newText[CARBON_TYPE.ENDLESS]:SetActive(false)
FunctionOpenMananger.CleadNewText(FUNCTION_OPEN_TYPE.ENDLESS)
if not ActTimeCtrlManager.SingleFuncState(46) then
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.ENDLESS))
return
end
CarbonManager.difficulty = 4
UIManager.OpenPanel(UIName.EndLessCarbonPanel)
this.RefreshOpenText(CARBON_TYPE.ENDLESS, FUNCTION_OPEN_TYPE.ENDLESS)
Util.AddClick(this.btnDaoxuan, function()
this:BtnAction(FUNCTION_OPEN_TYPE.TAOIST_MIRROR)
end)
--日常副本
Util.AddClick(this.dailyCarbonBtn,function()
if ActTimeCtrlManager.SingleFuncState(67)==false then--如果未解锁
PopupTipPanel.ShowTip(ActTimeCtrlManager.SystemOpenTip(FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN))
return
end
UIManager.OpenPanel(UIName.DailyCarbonPanel)
Util.AddClick(this.btnHelp, function()
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.XuanYuanMirror,this.helpPosition.x,this.helpPosition.y)
end)
-- 点击你的猪头
Util.AddClick(this.headBox, function ()
UIManager.OpenPanel(UIName.SettingPanel)
Util.AddClick(this.btnRank, function()
end)
BindRedPointObject(RedPointType.Setting, this.headRedpot)
Util.AddClick(this.vipPrivilegeBtn, function()
UIManager.OpenPanel(UIName.VipPanelV2)
Util.AddClick(this.btnReward, function()
end)
Util.AddClick(this.btnClose, function()
this:OnClose()
end)
end
function this:BtnAction(_type)
if ActTimeCtrlManager.SingleFuncState(_type) then
UIManager.OpenPanel(UIName.XuanYuanMirrorPanelList,_type,XuanYuanMirrorManager.GetMirrorData(_type))
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(_type))
end
end
--添加事件监听(用于子类重写)
function CarbonTypePanel:AddListener()
function this:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.FunctionCtrl.OnFunctionOpen, this.FreshIconShow)
Game.GlobalEvent:AddEvent(GameEvent.FunctionCtrl.OnFunctionClose, this.FreshIconShow)
end
--移除事件监听(用于子类重写)
function CarbonTypePanel:RemoveListener()
function this:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.FunctionCtrl.OnFunctionOpen, this.FreshIconShow)
Game.GlobalEvent:RemoveEvent(GameEvent.FunctionCtrl.OnFunctionClose, this.FreshIconShow)
end
function CarbonTypePanel:OnOpen()
-- 清除一下选得副本类型
CarbonManager.difficulty = 0
CheckRedPointStatus(RedPointType.EpicExplore_GetReward)
this.BtView:OnOpen({ sortOrder = self.sortingOrder, panelType = PanelTypeView.Carbon })
function this:OnOpen()
this.UpView:OnOpen({ showType = UpViewOpenType.ShowRight, panelType = PanelType.Main })
end
--界面打开时调用(用于子类重写)
function CarbonTypePanel:OnShow(...)
Util.SetGray(this.btnNormal, not ActTimeCtrlManager.SingleFuncState(17))
Util.SetGray(this.btnEpic, not ActTimeCtrlManager.SingleFuncState(30))
Util.SetGray(this.btnHero, not ActTimeCtrlManager.SingleFuncState(18))
Util.SetGray(this.btnLegend, not ActTimeCtrlManager.SingleFuncState(46))
Util.SetGray(this.dailyCarbonBtn,not ActTimeCtrlManager.SingleFuncState(67))
function this:OnShow(...)
Util.SetGray(this.btnYaoling, not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.MAGIC_MIRROR))
Util.SetGray(this.btnRenjie, not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.PEOPLE_MIRROR))
Util.SetGray(this.btnFochan, not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.BUDDHIST_MIRROR))
Util.SetGray(this.btnDaoxuan, not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.TAOIST_MIRROR))
this.remainTimes = "今日剩余次数:"..5
-- 音效
SoundManager.PlayMusic(SoundConfig.BGM_Carbon)
-- 播放动画
CarbonTypePanel:PlayAni()
CarbonManager.GetMissionLevelData()
this.FreshPlayerInfo()
this.SetPlayerHead()
this.SetOpenText()
this:PlayAni()
this.PlayScaleAnim()
end
-- 刷新玩家信息显示
function this.FreshPlayerInfo()
this.vipLevelText.sprite = VipManager.SetVipLevelImg()
this.level.text = PlayerManager.level
this.expSliderValue.value = PlayerManager.exp / PlayerManager.userLevelData[PlayerManager.level].Exp
this.playName.text = PlayerManager.nickName
this.teamPower.text = FormationManager.GetFormationPower(FormationManager.curFormationIndex)
end
-- 设置头像
function this.SetPlayerHead()
if not this.playerHead then
this.playerHead = SubUIManager.Open(SubUIConfig.PlayerHeadView, this.headPos.transform)
end
this.playerHead:SetHead(PlayerManager.head)
this.playerHead:SetFrame(PlayerManager.frame)
this.playerHead:SetScale(Vector3.one * 0.9)
this.playerHead:SetPosition(Vector3.New(-5, 0, 0))
end
--- 设置时候显示新字
----@param btnCarbon 副本类型按钮
function this.SetNewTextShow(btnCarbon, state)
--for i, v in pairs(this.newText) do
-- if i == carbonType then
-- v:SetActive(state)
-- end
--end
if btnCarbon then
local textGo = Util.GetGameObject(btnCarbon.transform, "Image")
if textGo then
textGo:SetActive(state)
end
end
end
function this:OnSortingOrderChange()
Util.AddParticleSortLayer(this.effect, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.wind, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.vipPrivilegeBtn, self.sortingOrder - orginLayer)
orginLayer = self.sortingOrder
end
function CarbonTypePanel:PlayAni()
-- 玩家没有资格开启
this.timerRoot:SetActive(false)
if not ActTimeCtrlManager.IsQualifiled(46) then
return
end
function this:PlayAni()
-- 启动定时器
this.StartCountTime()
-- 开门音效
if not this.isPlayDoorAudio then
this.isPlayDoorAudio = true
@ -251,10 +124,6 @@ function CarbonTypePanel:PlayAni()
end
end, 1.3):Start()
end
-- 动画播放完才显示时间
Timer.New(function ()
this.timerRoot:SetActive(true)
end, 2.5):Start()
end
function this.PlayScaleAnim()
@ -266,45 +135,8 @@ function this.PlayScaleAnim()
end
end
-- 选择类型
function this.ChooseCarbonType(type)
CarbonManager.difficulty = type
end
function this.StartCountTime()
this.countTime.text = ""
if this.timer then
this.timer:Stop()
this.timer = nil
end
local freshTime = 0
local isOpen = false
local str = ""
local serData = ActTimeCtrlManager.GetSerDataByTypeId(46)
if not ActTimeCtrlManager.FuncTimeJudge(46) then
freshTime = serData.startTime
isOpen = false
str = Language[10325]
else
freshTime = serData.endTime
isOpen = true
str = Language[10326]
end
hasFresh = false
if not this.timer then
this.timer = Timer.New(function()
if not this.timer or not this.countTime then
return
end
this.countTime.text = str .. FormatSecond(freshTime - PlayerManager.serverTime)
end, 1, -1, true)
this.timer:Start()
end
end
function this.FreshIconShow(id)
@ -313,53 +145,25 @@ function this.FreshIconShow(id)
this.refreshTimer = nil
this.refreshTimer = Timer.New(function ()
Util.SetGray(this.btnLegend, not ActTimeCtrlManager.SingleFuncState(46))
Util.SetGray(this.btnDaoxuan, not ActTimeCtrlManager.SingleFuncState(46))
this.StartCountTime()
end, 1)
this.refreshTimer:Start()
end
end
--界面关闭时调用(用于子类重写)
function CarbonTypePanel:OnClose()
if this.timer then
this.timer:Stop()
this.timer = nil
end
if this.refreshTimer then
this.refreshTimer:Stop()
this.refreshTimer = nil
end
function this:OnClose()
this.isPlayDoorAudio = false
end
function this.SetOpenText()
this.newText[CARBON_TYPE.NORMAL]:SetActive(FunctionOpenMananger.GetModuleOpen(17))
this.newText[CARBON_TYPE.ENDLESS]:SetActive(FunctionOpenMananger.GetModuleOpen(46))
this.newText[CARBON_TYPE.TRIAL]:SetActive(FunctionOpenMananger.GetModuleOpen(30))
this.newText[CARBON_TYPE.HERO]:SetActive(FunctionOpenMananger.GetModuleOpen(18))
end
-- 刷新显示
function this.RefreshOpenText(carbonType, openId)
this.newText[carbonType]:SetActive(FunctionOpenMananger.GetModuleOpen(openId))
--this.BtView:InitNewOpenShow()
end
--界面销毁时调用(用于子类重写)
function CarbonTypePanel:OnDestroy()
ClearRedPointObject(RedPointType.OrdinaryExplore)
ClearRedPointObject(RedPointType.HeroExplore)
ClearRedPointObject(RedPointType.EpicExplore)
ClearRedPointObject(RedPointType.LegendExplore)
ClearRedPointObject(RedPointType.Setting, this.headRedpot)
ClearRedPointObject(RedPointType.VipPrivilege, this.vipRedPoint)
hasFresh = false
SubUIManager.Close(this.BtView)
function this:OnDestroy()
ClearRedPointObject(RedPointType.Magic_Mirror)
ClearRedPointObject(RedPointType.People_Mirror)
ClearRedPointObject(RedPointType.Buddhist_Mirror)
ClearRedPointObject(RedPointType.Taoist_Mirror)
SubUIManager.Close(this.UpView)
end
return CarbonTypePanel
return XuanYuanMirrorPanel

View File

@ -1,396 +1,187 @@
require("Base/BasePanel")
CarbonTypePanelV2 = Inherit(BasePanel)
local this = CarbonTypePanelV2
XuanYuanMirrorPanelList = Inherit(BasePanel)
local this = XuanYuanMirrorPanelList
local hasFresh = false
local orginLayer = 0
local mirrors = {}
local curType = 0
local dataList = {}
local list = {}
local colorText = {
sprite = { [-1] = "s_slbz_1anniuhuise",[0] = "s_slbz_1anniuongse",[1] = "s_slbz_1anniuhuangse"},
color = { [-1] = "3B3B3B",[0] = "855139",[1] = "8B670C"},
text = { [-1] = "未开启",[0] = "挑战",[1] = "扫荡" }
}
local difficult = {
text = {"简单","普通","困难","噩梦","炼狱","地狱","深渊","传奇","神话"},
sprite = {"x_xb_tiao_05","x_xb_tiao_04","x_xb_tiao_03","x_xb_tiao_02","x_xb_tiao_01"},
}
--初始化组件(用于子类重写)
function CarbonTypePanelV2:InitComponent()
this.btnNormal = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/normalRoot") -- 剧情
this.btnLegend = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/trialRoot") -- 无尽
this.btnEpic = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/eliteRoot") -- 试炼
this.btnHero = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/otherRoot") -- 精英
--日常副本
this.dailyCarbonBtn=Util.GetGameObject(self.gameObject,"DailyCarbonBtn")
-- for i = 2, 4 do
-- Util.SetGray(Util.GetGameObject(self.gameObject,"BgRoot/"..i),true)
-- end
-- this.newText = {}
-- -- 四个新图标
-- this.newText = {
-- [CARBON_TYPE.NORMAL] = Util.GetGameObject(this.btnNormal, "Image"),
-- [CARBON_TYPE.ENDLESS] = Util.GetGameObject(this.btnLegend, "Image"),
-- [CARBON_TYPE.TRIAL] = Util.GetGameObject(this.btnEpic, "Image"),
-- [CARBON_TYPE.HERO] = Util.GetGameObject(this.btnHero, "Image"),
-- }
--- 活动开启时间显示
-- this.countTime = Util.GetGameObject(self.gameObject, "btnRoot/circle/Image/time"):GetComponent("Text")
-- this.timerRoot = Util.GetGameObject(self.gameObject, "btnRoot/circle/Image")
this.effect = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect")
this.wind = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect/juneng_chenggong/GameObject")
orginLayer = 0
--头像、战力
this.level = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/lvFrame/lv"):GetComponent("Text")
this.playName = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/name"):GetComponent("Text")
this.expSliderValue = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/exp"):GetComponent("Slider")
this.headBox = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox")
this.headPos = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/headpos")
this.headRedpot = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/headBox/redpot")
this.teamPower = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/powerBtn/value"):GetComponent("Text")
this.BtView = SubUIManager.Open(SubUIConfig.BtView, self.gameObject.transform)
function this:InitComponent()
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform)
mirrors[FUNCTION_OPEN_TYPE.MAGIC_MIRROR] = Util.GetGameObject(self.gameObject,"yaoling")
mirrors[FUNCTION_OPEN_TYPE.PEOPLE_MIRROR] = Util.GetGameObject(self.gameObject,"renjie")
mirrors[FUNCTION_OPEN_TYPE.BUDDHIST_MIRROR] = Util.GetGameObject(self.gameObject,"fuochan")
mirrors[FUNCTION_OPEN_TYPE.TAOIST_MIRROR] = Util.GetGameObject(self.gameObject,"daoxuan")
this.remainTimesTip = Util.GetGameObject(self.gameObject,"Panel/remainTimesTip"): GetComponent("Text")
this.vipTips = Util.GetGameObject(self.gameObject,"Panel/vipTips") : GetComponent("Text")
this.btnBack = Util.GetGameObject(self.gameObject,"Panel/BackBtn") : GetComponent("Text")
this.levelPre = Util.GetGameObject(self.gameObject,"Panel/Scroll/Pre")
local v21 = Util.GetGameObject(self.gameObject, "Panel/Scroll"):GetComponent("RectTransform").rect
this.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, Util.GetGameObject(self.transform, "Scroll").transform,
this.levelPre, Vector2.New(-v21.x*2, -v21.y*2), 1, 1, Vector2.New(0,15))
this.ScrollView.moveTween.MomentumAmount = 1
this.ScrollView.moveTween.Strength = 1
-- 特权
this.vipPrivilegeBtn = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/vipPrivilege/vipPrivilegeBtn")
this.vipLevelText = Util.GetGameObject(this.vipPrivilegeBtn, "bg/vip"):GetComponent("Image")
this.vipRedPoint = Util.GetGameObject(self.gameObject, "BgRoot/LeftUp/vipPrivilege/redPoint")
screenAdapte(this.vipPrivilegeBtn)
this.AnimRoot = Util.GetGameObject(self.gameObject, "btnRoot/circle/root")
end
local index = 1
--绑定事件(用于子类重写)
function CarbonTypePanelV2:BindEvent()
BindRedPointObject(RedPointType.VipPrivilege, this.vipRedPoint)
-- BindRedPointObject(RedPointType.OrdinaryExplore, Util.GetGameObject(this.btnNormal, "redPoint"))
-- BindRedPointObject(RedPointType.EpicExplore, Util.GetGameObject(this.btnEpic, "redPoint"))
-- BindRedPointObject(RedPointType.HeroExplore, Util.GetGameObject(this.btnHero, "redPoint"))
-- BindRedPointObject(RedPointType.LegendExplore, Util.GetGameObject(this.btnLegend, "redPoint"))
-- 剧情副本(现改为猎妖之路)
Util.AddClick(this.btnNormal, function()
-- if ActTimeCtrlManager.SingleFuncState(17) then
-- CarbonManager.difficulty = 1
-- local jumpCarbonId = CarbonManager.NeedLockId(100, 1)
-- UIManager.OpenPanel(UIName.PlotCarbonPanel, jumpCarbonId)
-- CheckRedPointStatus(RedPointType.NormalExplore_OpenMap)
-- this.RefreshOpenText(CARBON_TYPE.NORMAL, FUNCTION_OPEN_TYPE.NORMALCARBON)
-- FunctionOpenMananger.CleadNewText( FUNCTION_OPEN_TYPE.NORMALCARBON)
-- else
-- PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip( FUNCTION_OPEN_TYPE.NORMALCARBON))
-- end
if ActTimeCtrlManager.SingleFuncState(JumpType.Expedition) then
if #ExpeditionManager.nodeInfo <= 0 then
if ExpeditionManager.expeditionLeve == -1 then
NetManager.GetExpeditionRequest(2,function()
JumpManager.GoJump(64001)
end)
else
NetManager.GetExpeditionRequest(ExpeditionManager.expeditionLeve,function()
JumpManager.GoJump(64001)
end)
end
else
JumpManager.GoJump(64001)
end
else
if ExpeditionManager.ExpeditionState == 2 then
PopupTipPanel.ShowTip(Language[12195])
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.EXPEDITION))
end
end
end)
-- 试炼副本(暂时改为心魔试练。原锁妖塔;兽潮来袭)
Util.AddClick(this.btnEpic, function()
JumpManager.GoJump(1011)
-- if ActTimeCtrlManager.SingleFuncState(30) then
-- CarbonManager.difficulty = 2
-- UIManager.OpenPanel(UIName.TrialCarbonPanel)
-- RedPointManager.PlayerPrefsSetStr(PlayerManager.uid .. "Trial", 1)
-- CheckRedPointStatus(RedPointType.EpicExplore_OpenCarbon)
-- this.RefreshOpenText(CARBON_TYPE.TRIAL, FUNCTION_OPEN_TYPE.TRIAL)
-- FunctionOpenMananger.CleadNewText(FUNCTION_OPEN_TYPE.TRIAL)
-- else
-- PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.TRIAL))
-- end
end)
-- 英雄副本
Util.AddClick(this.btnHero, function()
if ActTimeCtrlManager.SingleFuncState(18) then
CarbonManager.difficulty = 3
UIManager.OpenPanel(UIName.EliteCarbonPanel)
CheckRedPointStatus(RedPointType.HeroExplore_OpenMap)
this.RefreshOpenText(CARBON_TYPE.HERO, FUNCTION_OPEN_TYPE.ELITE)
FunctionOpenMananger.CleadNewText(FUNCTION_OPEN_TYPE.ELITE)
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.ELITE))
end
end)
-- 无尽副本(暂时改为车迟斗法)
Util.AddClick(this.btnLegend, function()
if PlayerManager.familyId == 0 then
PopupTipPanel.ShowTip(Language[10327])
return
end
UIManager.OpenPanel(UIName.GuildCarDelayMainPanel)
-- this.newText[CARBON_TYPE.ENDLESS]:SetActive(false)
-- FunctionOpenMananger.CleadNewText(FUNCTION_OPEN_TYPE.ENDLESS)
-- if not ActTimeCtrlManager.SingleFuncState(46) then
-- PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.ENDLESS))
-- return
-- end
-- CarbonManager.difficulty = 4
-- UIManager.OpenPanel(UIName.EndLessCarbonPanel)
-- this.RefreshOpenText(CARBON_TYPE.ENDLESS, FUNCTION_OPEN_TYPE.ENDLESS)
end)
--日常副本
Util.AddClick(this.dailyCarbonBtn,function()
if ActTimeCtrlManager.SingleFuncState(67)==false then--如果未解锁
PopupTipPanel.ShowTip(ActTimeCtrlManager.SystemOpenTip(FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN))
return
end
UIManager.OpenPanel(UIName.DailyCarbonPanel)
end)
-- 点击你的猪头
Util.AddClick(this.headBox, function ()
UIManager.OpenPanel(UIName.SettingPanel)
end)
BindRedPointObject(RedPointType.Setting, this.headRedpot)
Util.AddClick(this.vipPrivilegeBtn, function()
UIManager.OpenPanel(UIName.VipPanelV2)
end)
function this:BindEvent()
end
--添加事件监听(用于子类重写)
function CarbonTypePanelV2:AddListener()
-- Game.GlobalEvent:AddEvent(GameEvent.FunctionCtrl.OnFunctionOpen, this.FreshIconShow)--原无尽5点刷新相关 暂时不用了
-- Game.GlobalEvent:AddEvent(GameEvent.FunctionCtrl.OnFunctionClose, this.FreshIconShow)
function this:AddListener()
end
--移除事件监听(用于子类重写)
function CarbonTypePanelV2:RemoveListener()
-- Game.GlobalEvent:RemoveEvent(GameEvent.FunctionCtrl.OnFunctionOpen, this.FreshIconShow)
-- Game.GlobalEvent:RemoveEvent(GameEvent.FunctionCtrl.OnFunctionClose, this.FreshIconShow)
function this:RemoveListener()
end
function CarbonTypePanelV2:OnOpen()
-- 清除一下选得副本类型
CarbonManager.difficulty = 0
CheckRedPointStatus(RedPointType.EpicExplore_GetReward)
this.BtView:OnOpen({ sortOrder = self.sortingOrder, panelType = PanelTypeView.Carbon })
function this:OnOpen(_type,_data)
this.UpView:OnOpen({ showType = UpViewOpenType.ShowRight, panelType = PanelType.Main })
curType = _type
dataList = _data
end
function this:SwitchView()
local curObj
for k,v in pairs(mirrors) do
if curType == k then
v.gameObject:SetActive(true)
curObj = v
else
v.gameObject:SetActive(false)
end
end
if curObj then
Util.GetGameObject(curObj,"Text"):GetComponent("Text").text = "妖系神将额外造成50%伤害\n非妖系神将降低50%攻击力"
end
this.ScrollView:SetData(dataList, function (index, go)
this:SetLevelData(go, dataList[index])
table.insert(list,go)
end)
end
function this:SetLevelData(go, data)
local btnFight = Util.GetGameObject(go,"btnFight")
btnFight:GetGameObject("Image").sprite = Util.LoadSprite(colorText.sprite[data.state])
local text = Util.GetGameObject(btnFight,"Text"):GetGameObject("Text")
text.color = colorText.color[data.state]
text.text = colorText.text[data.state]
local tip = Util.GetGameObject(btnFight,"Tip"):GetGameObject("Text")
if data.state == -1 then
tip.gameObject:SetActive(false)
elseif data.state == 0 then
tip.text=data.condition
else
tip.text="已通过"
end
Util.AddOnceClick(btnFight:GetGameObject("Button"),function()
if data.state ==0 then
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.XUANYUAN_MIRROR,curType)
elseif data.state == -1 then
PopupTipPanel.ShowTip("通过上一难度开启")
else
--扫荡
end
end)
local rewardGrid = Util.GetGameObject(go,"Reward")
local rewards = {}
local index = 1
for n,m in ipairs(data.rewards) do
if m then
--设置概率掉落奖励
if m.israte then
if not rewards[index] then
rewards[index] = SubUIManager.Open(SubUIConfig.ItemView,rewardGrid.transform)
end
rewards[index]:OnOpen(false, {m.id, m.num}, 1.6, false)
index = index + 1
local image = Util.GetGameObject(rewards[n],"PreciousShow")
image.gameObject:SetActive(true)
Util.GetGameObject(rewards[n],"PreciousShow/Text").gameObject:SetActive(false)
image:GetComponent("Image").sprite = Util.LoadSprite("x_xianyuan_gailvjiaobiao")
end
--设置首通掉落奖励
if data.state == -1 or data.state == 0 then
if m.isFirst then
if not rewards[index] then
rewards[index] = SubUIManager.Open(SubUIConfig.ItemView,rewardGrid.transform)
end
rewards[index]:OnOpen(false, {m.id, m.num}, 1.6, false)
index = index + 1
local image = Util.GetGameObject(rewards[n],"PreciousShow")
image.gameObject:SetActive(true)
Util.GetGameObject(rewards[n],"PreciousShow/Text").gameObject:SetActive(false)
image:GetComponent("Image").sprite = Util.LoadSprite("x_xianyuan_shoucijiaobiao")
end
--设置扫荡掉落奖励
else
if not m.isFirst and not m.israte then
if not rewards[index] then
rewards[index] = SubUIManager.Open(SubUIConfig.ItemView,rewardGrid.transform)
end
rewards[index]:OnOpen(false, {m.id, m.num}, 1.6, false)
index = index + 1
local image = Util.GetGameObject(rewards[n],"PreciousShow")
image.gameObject:SetActive(false)
end
end
end
end
Util.GetGameObject(btnFight,"Bg/BgQuality/title"):GetGameObject("Text").text = data.title
Util.GetGameObject(btnFight,"Bg/BgQuality/difficult"):GetGameObject("Text").text = difficult.text[data.difficult]
Util.GetGameObject(btnFight,"Bg/BgQuality"):GetGameObject("Image").sprite = difficult.sprite[data.difficult]
Util.GetGameObject(btnFight,"Bg/BgQuality/Text"):GetGameObject("Text").text = data.power
end
--界面打开时调用(用于子类重写)
function CarbonTypePanelV2:OnShow(...)
Util.SetGray(this.btnNormal, not ActTimeCtrlManager.SingleFuncState(17))
Util.SetGray(this.btnEpic, not ActTimeCtrlManager.SingleFuncState(30))
Util.SetGray(this.btnHero, not ActTimeCtrlManager.SingleFuncState(18))
Util.SetGray(this.btnLegend, not ActTimeCtrlManager.SingleFuncState(46))
Util.SetGray(this.dailyCarbonBtn,not ActTimeCtrlManager.SingleFuncState(67))
-- 音效
SoundManager.PlayMusic(SoundConfig.BGM_Carbon)
-- 播放动画
-- CarbonTypePanelV2:PlayAni()
CarbonManager.GetMissionLevelData()
this.FreshPlayerInfo()
this.SetPlayerHead()
this.SetOpenText()
this.PlayScaleAnim()
end
-- 刷新玩家信息显示
function this.FreshPlayerInfo()
this.vipLevelText.sprite = VipManager.SetVipLevelImg()
this.level.text = PlayerManager.level
this.expSliderValue.value = PlayerManager.exp / PlayerManager.userLevelData[PlayerManager.level].Exp
this.playName.text = PlayerManager.nickName
this.teamPower.text = FormationManager.GetFormationPower(FormationManager.curFormationIndex)
end
-- 设置头像
function this.SetPlayerHead()
if not this.playerHead then
this.playerHead = SubUIManager.Open(SubUIConfig.PlayerHeadView, this.headPos.transform)
end
this.playerHead:SetHead(PlayerManager.head)
this.playerHead:SetFrame(PlayerManager.frame)
this.playerHead:SetScale(Vector3.one * 0.9)
this.playerHead:SetPosition(Vector3.New(-5, 0, 0))
end
--- 设置时候显示新字
----@param btnCarbon 副本类型按钮
function this.SetNewTextShow(btnCarbon, state)
-- for i, v in pairs(this.newText) do
-- if i == carbonType then
-- v:SetActive(state)
-- end
-- end
if btnCarbon then
local textGo = Util.GetGameObject(btnCarbon.transform, "Image")
if textGo then
textGo:SetActive(state)
end
end
function this:OnShow(...)
this.remainTimesTip.text = "剩余时间5天23小时"
this.vipTips.text = "<color=#B54D52>(激活特权可增加次数)</color>"
this:SwitchView()
end
function this:OnSortingOrderChange()
Util.AddParticleSortLayer(this.effect, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.wind, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.vipPrivilegeBtn, self.sortingOrder - orginLayer)
orginLayer = self.sortingOrder
this.BtView:SetOrderStatus({ sortOrder = self.sortingOrder })
end
function CarbonTypePanelV2:PlayAni()
-- 玩家没有资格开启
-- this.timerRoot:SetActive(false)
-- if not ActTimeCtrlManager.IsQualifiled(46) then
-- return
-- end
-- 启动定时器
-- this.StartCountTime()
-- 开门音效
if not this.isPlayDoorAudio then
this.isPlayDoorAudio = true
Timer.New(function ()
if this.isPlayDoorAudio then
SoundManager.PlaySound(SoundConfig.Sound_Door)
end
end, 1.3):Start()
end
-- 动画播放完才显示时间
-- Timer.New(function ()
-- this.timerRoot:SetActive(true)
-- end, 2.5):Start()
end
function this.PlayScaleAnim()
local isOpen = FunctionOpenMananger.GetRootState(PanelTypeView.Carbon)
if isOpen then
PlayUIAnim(this.AnimRoot)
else
PlayUIAnimBack(this.AnimRoot)
end
end
-- 选择类型
function this.ChooseCarbonType(type)
CarbonManager.difficulty = type
end
-- function this.StartCountTime()
-- this.countTime.text = ""
-- if this.timer then
-- this.timer:Stop()
-- this.timer = nil
-- end
-- local freshTime = 0
-- local isOpen = false
-- local str = ""
-- local serData = ActTimeCtrlManager.GetSerDataByTypeId(46)
-- if not ActTimeCtrlManager.FuncTimeJudge(46) then
-- freshTime = serData.startTime
-- isOpen = false
-- str = "距离开启"
-- else
-- freshTime = serData.endTime
-- isOpen = true
-- str = "距离结束"
-- end
-- hasFresh = false
-- if not this.timer then
-- this.timer = Timer.New(function()
-- if not this.timer or not this.countTime then
-- return
-- end
-- this.countTime.text = str .. FormatSecond(freshTime - PlayerManager.serverTime)
-- end, 1, -1, true)
-- this.timer:Start()
-- end
-- end
-- function this.FreshIconShow(id)
-- if not hasFresh then
-- hasFresh = true
-- this.refreshTimer = nil
-- this.refreshTimer = Timer.New(function ()
-- Util.SetGray(this.btnLegend, not ActTimeCtrlManager.SingleFuncState(46))
-- this.StartCountTime()
-- end, 1)
-- this.refreshTimer:Start()
-- end
-- end
--界面关闭时调用(用于子类重写)
function CarbonTypePanelV2:OnClose()
if this.timer then
this.timer:Stop()
this.timer = nil
end
if this.refreshTimer then
this.refreshTimer:Stop()
this.refreshTimer = nil
end
this.isPlayDoorAudio = false
function this:OnClose()
end
function this.SetOpenText()
-- this.newText[CARBON_TYPE.NORMAL]:SetActive(FunctionOpenMananger.GetModuleOpen(17))
-- this.newText[CARBON_TYPE.ENDLESS]:SetActive(FunctionOpenMananger.GetModuleOpen(46))
-- this.newText[CARBON_TYPE.TRIAL]:SetActive(FunctionOpenMananger.GetModuleOpen(30))
-- this.newText[CARBON_TYPE.HERO]:SetActive(FunctionOpenMananger.GetModuleOpen(18))
end
-- 刷新显示
function this.RefreshOpenText(carbonType, openId)
-- this.newText[carbonType]:SetActive(FunctionOpenMananger.GetModuleOpen(openId))
this.BtView:InitNewOpenShow()
end
--界面销毁时调用(用于子类重写)
function CarbonTypePanelV2:OnDestroy()
-- ClearRedPointObject(RedPointType.OrdinaryExplore)
-- ClearRedPointObject(RedPointType.HeroExplore)
-- ClearRedPointObject(RedPointType.EpicExplore)
-- ClearRedPointObject(RedPointType.LegendExplore)
-- ClearRedPointObject(RedPointType.Setting, this.headRedpot)
-- ClearRedPointObject(RedPointType.VipPrivilege, this.vipRedPoint)
hasFresh = false
SubUIManager.Close(this.BtView)
function this:OnDestroy()
SubUIManager.Close(this.UpView)
this.ScrollView = nil
end
return CarbonTypePanelV2
return XuanYuanMirrorPanelList

View File

@ -478,10 +478,10 @@ end
function this.RefreshPanelShowByState()
if ExpeditionManager.ExpeditionPanelIsOpen == 1 and UIManager.IsOpen(UIName.ExpeditionMainPanel) then --not UIManager.IsOpen(UIName.BattlePanel) then
if ExpeditionManager.ExpeditionState == 2 then
UIManager.OpenPanel(UIName.CarbonTypePanelV2)
UIManager.OpenPanel(UIName.CarbonTypePanelV2,1)
PopupTipPanel.ShowTip(Language[12195])
elseif ExpeditionManager.ExpeditionState == 3 then
UIManager.OpenPanel(UIName.CarbonTypePanelV2)
UIManager.OpenPanel(UIName.CarbonTypePanelV2,1)
PopupTipPanel.ShowTip(Language[12195])
end
end

View File

@ -56,6 +56,7 @@ this.PanelOptionView = {
[FORMATION_TYPE.SAVE_FORMATION]="Modules/Formation/View/SaveFormation",
[FORMATION_TYPE.GUILD_CAR_DELEAY]="Modules/Formation/View/GuildCarDeleayFormation",
[FORMATION_TYPE.GUILD_DEATHPOS]="Modules/Formation/View/GuildDeathPosFormation",
[FORMATION_TYPE.XUANYUAN_MIRROR]="Modules/Formation/View/XuanYuanMirrorFormation",
}
function this:InitComponent()
orginLayer=0
@ -137,6 +138,9 @@ function this:InitComponent()
-- 上阵等级提示
this.formTip = Util.GetGameObject(self.transform, "bottom/formTip")
-- 上阵元素提示
this.tip = Util.GetGameObject(self.transform, "bottom/tip")
this.tip.gameObject:SetActive(false)
this.mopUpGo.transform:SetParent(self.gameObject.transform)
this.mopUpGo:SetActive(false)
@ -241,8 +245,6 @@ function this:OnDestroy()
this.scrollView = nil
end
--刷新编队
function this.RefreshFormation()
proId=0

View File

@ -0,0 +1,75 @@
----- 副本 -----
local XuanYuanMirrorFormation = {}
local this = XuanYuanMirrorFormation
--- 逻辑初始化
function this.Init(root)
this.root = root
this.InitView()
end
-- 初始化界面显示
function this.InitView()
-- 初始化编队数据
this.IniFormationSet(CarbonManager.difficulty)
this.root.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = _PanelType[CarbonManager.difficulty] })
end
--- 获取需要显示的编队id
function this.GetFormationIndex()
local index = 0
return index
end
--- btn1点击回调事件
function this.On_Btn1_Click()
if this.root.order>=1 then
--保存编队
FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,
FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos)
PopupTipPanel.ShowTip(Language[10713])
else
PopupTipPanel.ShowTip(Language[10714])
end
end
-- 进入地图
function this.On_Btn2_Click()
if this.root.order >= 1 then
--保存编队
FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,
FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos)
else
PopupTipPanel.ShowTip(string.format(Language[10701], 1))
return
end
-- 判断当前选择的副本类型
local itemId = itemType[CarbonManager.difficulty]
-- 判断挑战次数
-- 战斗力判断
this.EnterMapbyType(CarbonManager.difficulty, itemId)
end
-- 根据不同的副本类型进入地图
function this.EnterMapbyType(type, itemId)
SwitchPanel.OpenPanel(UIName.MapPanel)
end
--- 关闭界面事件
function this.OnCloseBtnClick()
this.root:ClosePanel()
end
function this.IniFormationSet(type)
end
return this

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 6224b412c8f14724f9d96ee4c50777f2
timeCreated: 1558578726
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -653,37 +653,7 @@ function this:BindEvent()
this.ScenceBtnClick(FUNCTION_OPEN_TYPE.ARENA)
end)
Util.AddClick(this.btnColorfulWorld, function()
if ActTimeCtrlManager.SingleFuncState(30) then
CarbonManager.difficulty = 2
local trialDataConfig = ConfigManager.GetConfig(ConfigName.TrialConfig)
if MapTrialManager.curTowerLevel > 10000 then
MapManager.curMapId = MapTrialManager.GetSurprisedLevelMapId()
else
MapManager.curMapId = trialDataConfig[MapTrialManager.curTowerLevel].MapId
end
NetManager.MapInfoRequest(MapManager.curMapId, FormationTypeDef.FORMATION_DREAMLAND, function(msg)
MapManager.isReloadEnter = false
MapTrialManager.firstEnter = true
MapManager.SetViewSize(20)--设置视野范围(明雷形式)
MapManager.curAreaId =FormationTypeDef.FORMATION_DREAMLAND
MapManager.trialHeroInfo=msg.infos
SwitchPanel.OpenPanel(UIName.MapPanel)
end)
-- local curMapId = trialDataConfig[MapTrialManager.curTowerLevel].MapId
-- UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.CARBON, curMapId)
-- UIManager.OpenPanel(UIName.TrialCarbonPanel)
-- RedPointManager.PlayerPrefsSetStr(PlayerManager.uid .. "Trial", 1)
-- CheckRedPointStatus(RedPointType.EpicExplore_OpenCarbon)
-- this.RefreshOpenText(CARBON_TYPE.TRIAL, FUNCTION_OPEN_TYPE.TRIAL)
-- FunctionOpenMananger.CleadNewText(FUNCTION_OPEN_TYPE.TRIAL)
LogBlue(Language[11163])
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.TRIAL))
end
this.ScenceBtnClick(FUNCTION_OPEN_TYPE.TRIAL)
UIManager.OpenPanel(UIName.CarbonTypePanelV2,2)
end)
Util.AddClick(this.btnFenjie, function()
JumpManager.GoJump(24001)

View File

@ -49,7 +49,7 @@ end
function MonsterCampPanel:BindEvent()
Util.AddClick(this.btnBack, function ()
-- UIManager.OpenPanel(UIName.MainPanel)
UIManager.OpenPanel(UIName.CarbonTypePanelV2)
UIManager.OpenPanel(UIName.CarbonTypePanelV2,1)
self:ClosePanel()
end)

View File

@ -152,7 +152,7 @@ function this.RefreshUpdateIndication(buffer)
CheckRedPointStatus(RedPointType.SecretTer_HaveFreeTime)
CheckRedPointStatus(RedPointType.DailyGift)
CheckRedPointStatus(RedPointType.GrowthPackage)
--工会红点
CheckRedPointStatus(RedPointType.Guild_Fete)
CheckRedPointStatus(RedPointType.Guild_AidBox)
CheckRedPointStatus(RedPointType.Guild_AidGuild)

View File

@ -74,7 +74,7 @@ function this:OpenJieling()
end
-- 打开副本选择界面
function this:OpenCarbon()
UIManager.OpenPanel(UIName.CarbonTypePanelV2)
UIManager.OpenPanel(UIName.CarbonTypePanelV2,1)
end
function this:OpenGuild()
JumpManager.GoJump(4001)

Binary file not shown.

Binary file not shown.