轩辕宝镜提交

dev_chengFeng
jiaoyangna 2020-07-21 10:42:20 +08:00
parent 9b7e47aaef
commit 03107d240a
12 changed files with 274 additions and 57 deletions

View File

@ -1159,11 +1159,10 @@ FUNCTION_OPEN_TYPE = {
DAILYCHALLENGE_HERODEBRIS=69,--每日角色碎片副本 DAILYCHALLENGE_HERODEBRIS=69,--每日角色碎片副本
DAILYCHALLENGE_TALISMAN=70,--每日法宝副本 DAILYCHALLENGE_TALISMAN=70,--每日法宝副本
DAILYCHALLENGE_SOULPRINT=71,--每日魂印副本 DAILYCHALLENGE_SOULPRINT=71,--每日魂印副本
XUANYUAN_MIRROR=74,--妖灵宝镜 PEOPLE_MIRROR=74,--人杰宝镜
MAGIC_MIRROR=75,--妖灵宝镜 BUDDHIST_MIRROR=75,--佛禅宝镜
PEOPLE_MIRROR=76,--人杰宝镜 MAGIC_MIRROR=76,--妖灵宝镜
BUDDHIST_MIRROR=77,--佛禅宝镜 TAOIST_MIRROR=77,--道玄宝镜
TAOIST_MIRROR=78,--道玄宝镜
} }
TaskGetBtnIconDef = { TaskGetBtnIconDef = {

View File

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

View File

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

View File

@ -0,0 +1,154 @@
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()
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
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

@ -5,20 +5,20 @@ local this = XuanYuanMirrorManager
local levelData = {} local levelData = {}
function this.Initialize() function this.Initialize()
this.InitMirrorData()
end end
--前端表 --前端表
function this.GetMirrorData(_type) function this.GetMirrorData(_type)
_type = _type - 73
if levelData[_type] then if levelData[_type] then
return levelData[_type] return levelData[_type]
end end
this.InitMirrorData(_type)
end end
function this.InitMirrorData(_type) function this.InitMirrorData()
levelData = {} levelData = {}
for k,v in pairs(raceTowerConfig) do for k,v in ipairs(raceTowerConfig) do
if not levelData[v.Type] then if not levelData[v.Type] then
levelData[v.Type] = {} levelData[v.Type] = {}
end end
@ -31,10 +31,11 @@ function this.InitMirrorData(_type)
LogGreen("v.TeamRules:"..#v.TeamRules) LogGreen("v.TeamRules:"..#v.TeamRules)
data.teamRules = v.TeamRules data.teamRules = v.TeamRules
data.condition = string.format("需要上阵%s名%s系神将",data.teamRules[1][2],this.PropertyName(data.teamRules[1][1])) 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) local tempConfig = ConfigManager.GetConfigData(ConfigName.RewardGroup,v.Reward)
LogGreen("ShowItem:"..#tempConfig.ShowItem) LogGreen("ShowItem:"..#tempConfig.ShowItem)
data.rewardList = {}
for i=1, #tempConfig.ShowItem do for i=1, #tempConfig.ShowItem do
table.insert(data.rewardList,{id = tempConfig.ShowItem[i][1],num = tempConfig.ShowItem[i][2],israte = true}) table.insert(data.rewardList,{id = tempConfig.ShowItem[i][1],num = tempConfig.ShowItem[i][2],israte = true})
end end
@ -44,10 +45,12 @@ function this.InitMirrorData(_type)
table.insert(data.rewardList,{id = v.RewardView[i][1],num = v.RewardView[i][2]}) table.insert(data.rewardList,{id = v.RewardView[i][1],num = v.RewardView[i][2]})
end end
--首通奖励 --首通奖励
LogGreen("FirstRewardView:"..#v.FirstRewardView) tempConfig = ConfigManager.GetConfigData(ConfigName.RewardGroup,v.FirstReward)
for i=1, #v.FirstRewardView do LogGreen("ShowItem:"..#tempConfig.ShowItem)
table.insert(data.rewardList,{id = v.FirstRewardView[i][1],num = v.FirstRewardView[i][2],isFirst = true}) for i=1, #tempConfig.ShowItem do
table.insert(data.rewardList,{id = tempConfig.ShowItem[i][1],num = tempConfig.ShowItem[i][2],isFirst = true})
end end
data.state = -1
table.insert(levelData[v.Type],data) table.insert(levelData[v.Type],data)
end end
end end

View File

@ -18,14 +18,6 @@ function this:InitComponent()
this.btnClose = Util.GetGameObject(self.gameObject, "btnRoot/btnBack") this.btnClose = Util.GetGameObject(self.gameObject, "btnRoot/btnBack")
this.remainTimes = Util.GetGameObject(self.gameObject, "remainTimes") :GetComponent("Text") this.remainTimes = Util.GetGameObject(self.gameObject, "remainTimes") :GetComponent("Text")
-- 四个新图标
this.newText = {
[1] = Util.GetGameObject(this.btnYaoling, "Image"),
[2] = Util.GetGameObject(this.btnRenjie, "Image"),
[3] = Util.GetGameObject(this.btnFochan, "Image"),
[4] = Util.GetGameObject(this.btnDaoxuan, "Image"),
}
this.effect = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect") this.effect = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect")
this.wind = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect/juneng_chenggong/GameObject") this.wind = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect/juneng_chenggong/GameObject")
@ -74,7 +66,7 @@ function this:BindEvent()
end end
function this:BtnAction(_type) function this:BtnAction(_type)
if ActTimeCtrlManager.SingleFuncState(_type) then if ActTimeCtrlManager.SingleFuncState(_type) then
UIManager.OpenPanel(UIName.HelpPopup,_type,XuanYuanMirrorManager.GetMirrorData(_type)) UIManager.OpenPanel(UIName.XuanYuanMirrorPanelList,_type,XuanYuanMirrorManager.GetMirrorData(_type))
else else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(_type)) PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(_type))
end end
@ -99,9 +91,9 @@ end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function this:OnShow(...) function this:OnShow(...)
Util.SetGray(this.btnYaoling, not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.MAGIC_MIRROR)) Util.SetGray(this.btnYaoling, not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.MAGIC_MIRROR))
Util.SetGray(this.btnHero, not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.PEOPLE_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.btnFochan, not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.BUDDHIST_MIRROR))
Util.SetGray(this.btnLegend, not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.TAOIST_MIRROR)) Util.SetGray(this.btnDaoxuan, not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.TAOIST_MIRROR))
this.remainTimes = "今日剩余次数:"..5 this.remainTimes = "今日剩余次数:"..5
-- 音效 -- 音效
@ -109,7 +101,6 @@ function this:OnShow(...)
-- 播放动画 -- 播放动画
this:PlayAni() this:PlayAni()
this.SetOpenText()
this.PlayScaleAnim() this.PlayScaleAnim()
end end
@ -122,16 +113,8 @@ end
function this:PlayAni() function this:PlayAni()
-- 玩家没有资格开启
this.timerRoot:SetActive(false)
if not ActTimeCtrlManager.IsQualifiled(46) then
return
end
-- 启动定时器 -- 启动定时器
this.StartCountTime() this.StartCountTime()
-- 开门音效 -- 开门音效
if not this.isPlayDoorAudio then if not this.isPlayDoorAudio then
this.isPlayDoorAudio = true this.isPlayDoorAudio = true
@ -141,10 +124,6 @@ function this:PlayAni()
end end
end, 1.3):Start() end, 1.3):Start()
end end
-- 动画播放完才显示时间
Timer.New(function ()
this.timerRoot:SetActive(true)
end, 2.5):Start()
end end
function this.PlayScaleAnim() function this.PlayScaleAnim()
@ -171,7 +150,7 @@ function this.FreshIconShow(id)
this.refreshTimer = nil this.refreshTimer = nil
this.refreshTimer = Timer.New(function () this.refreshTimer = Timer.New(function ()
Util.SetGray(this.btnLegend, not ActTimeCtrlManager.SingleFuncState(46)) Util.SetGray(this.btnDaoxuan, not ActTimeCtrlManager.SingleFuncState(46))
this.StartCountTime() this.StartCountTime()
end, 1) end, 1)
this.refreshTimer:Start() this.refreshTimer:Start()
@ -183,18 +162,6 @@ function this:OnClose()
this.isPlayDoorAudio = false this.isPlayDoorAudio = false
end end
function this.SetOpenText()
this.newText[1]:SetActive(FunctionOpenMananger.GetModuleOpen(FUNCTION_OPEN_TYPE.MAGIC_MIRROR))
this.newText[2]:SetActive(FunctionOpenMananger.GetModuleOpen(FUNCTION_OPEN_TYPE.PEOPLE_MIRROR))
this.newText[3]:SetActive(FunctionOpenMananger.GetModuleOpen(FUNCTION_OPEN_TYPE.BUDDHIST_MIRROR))
this.newText[4]:SetActive(FunctionOpenMananger.GetModuleOpen(FUNCTION_OPEN_TYPE.TAOIST_MIRROR))
end
-- 刷新显示
function this.RefreshOpenText(carbonType, openId)
this.newText[carbonType]:SetActive(FunctionOpenMananger.GetModuleOpen(openId))
end
--界面销毁时调用(用于子类重写) --界面销毁时调用(用于子类重写)
function this:OnDestroy() function this:OnDestroy()
ClearRedPointObject(RedPointType.Magic_Mirror) ClearRedPointObject(RedPointType.Magic_Mirror)

View File

@ -26,8 +26,9 @@ function this:InitComponent()
mirrors[FUNCTION_OPEN_TYPE.BUDDHIST_MIRROR] = Util.GetGameObject(self.gameObject,"fuochan") mirrors[FUNCTION_OPEN_TYPE.BUDDHIST_MIRROR] = Util.GetGameObject(self.gameObject,"fuochan")
mirrors[FUNCTION_OPEN_TYPE.TAOIST_MIRROR] = Util.GetGameObject(self.gameObject,"daoxuan") mirrors[FUNCTION_OPEN_TYPE.TAOIST_MIRROR] = Util.GetGameObject(self.gameObject,"daoxuan")
this.remainTimesTip = Util.GetGameObject(self.gameObject,"Panel/remainTimesTip") : GetGameObject("Text") this.remainTimesTip = Util.GetGameObject(self.gameObject,"Panel/remainTimesTip"): GetComponent("Text")
this.btnBack = Util.GetGameObject(self.gameObject,"Panel/BackBtn") : GetGameObject("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") this.levelPre = Util.GetGameObject(self.gameObject,"Panel/Scroll/Pre")
local v21 = Util.GetGameObject(self.gameObject, "Panel/Scroll"):GetComponent("RectTransform").rect local v21 = Util.GetGameObject(self.gameObject, "Panel/Scroll"):GetComponent("RectTransform").rect
@ -154,7 +155,8 @@ end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function this:OnShow(...) function this:OnShow(...)
this.remainTimesTip = "剩余时间5天23小时<color=#B54D52>(激活特权可增加次数)</color>" this.remainTimesTip.text = "剩余时间5天23小时"
this.vipTips.text = "<color=#B54D52>(激活特权可增加次数)</color>"
this:SwitchView() this:SwitchView()
end end

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

@ -654,7 +654,6 @@ function this:BindEvent()
end) end)
Util.AddClick(this.btnColorfulWorld, function() Util.AddClick(this.btnColorfulWorld, function()
UIManager.OpenPanel(UIName.CarbonTypePanelV3) UIManager.OpenPanel(UIName.CarbonTypePanelV3)
this.ScenceBtnClick(FUNCTION_OPEN_TYPE.XUANYUAN_MIRROR)
end) end)
Util.AddClick(this.btnFenjie, function() Util.AddClick(this.btnFenjie, function()
JumpManager.GoJump(24001) JumpManager.GoJump(24001)