【逍遥游优化】逍遥游玩法优化内容
parent
1ba79f4627
commit
3a6e07bf1c
|
@ -344,6 +344,7 @@ RectTransform:
|
|||
- {fileID: 798232544032123905}
|
||||
- {fileID: 3628702650913898151}
|
||||
- {fileID: 120196160230743246}
|
||||
- {fileID: 4283035908402714740}
|
||||
m_Father: {fileID: 913146193029197762}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -1897,6 +1898,41 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &4107428381734209047
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6749167481729292294}
|
||||
m_Layer: 5
|
||||
m_Name: redPoint
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6749167481729292294
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4107428381734209047}
|
||||
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: 91866266988071576}
|
||||
m_RootOrder: 4
|
||||
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: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &4264963760793217269
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1931,6 +1967,7 @@ RectTransform:
|
|||
- {fileID: 5281754449960765727}
|
||||
- {fileID: 3785957058261045306}
|
||||
- {fileID: 6859423270201731393}
|
||||
- {fileID: 7182102039065137785}
|
||||
m_Father: {fileID: 913146193029197762}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -4234,6 +4271,41 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &8033203346880886019
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7182102039065137785}
|
||||
m_Layer: 5
|
||||
m_Name: redPoint
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7182102039065137785
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8033203346880886019}
|
||||
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: 8951745513582367480}
|
||||
m_RootOrder: 4
|
||||
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: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &8121433219633590081
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -4625,6 +4697,41 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
--- !u!1 &8721724692793742545
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4283035908402714740}
|
||||
m_Layer: 5
|
||||
m_Name: redPoint
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4283035908402714740
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8721724692793742545}
|
||||
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: 636454027232682164}
|
||||
m_RootOrder: 4
|
||||
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: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &8755262926574985647
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -4870,6 +4977,7 @@ RectTransform:
|
|||
- {fileID: 9198196378565562289}
|
||||
- {fileID: 898296640287834516}
|
||||
- {fileID: 3044515835392445122}
|
||||
- {fileID: 6749167481729292294}
|
||||
m_Father: {fileID: 913146193029197762}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
|
@ -437,7 +437,7 @@ function this.RegisterRedCheckFunc()
|
|||
|
||||
RPData:AddCheckFunc(RedPointType.WeekGiftPage,OperatingManager.CheckWeekGiftPageRedPoint)
|
||||
RPData:AddCheckFunc(RedPointType.MonthGiftPage,OperatingManager.CheckMonthGiftPageRedPoint)
|
||||
RPData:AddCheckFunc(RedPointType.XiaoYaoYouRedPoint, XiaoYaoManager.CheckRedPoint, FUNCTION_OPEN_TYPE.XiaoYaoYou)
|
||||
RPData:AddCheckFunc(RedPointType.XiaoYaoYouRedPoint, XiaoYaoManager.CheckRedPoint)
|
||||
--灵兽
|
||||
RPData:AddCheckFunc(RedPointType.Pokemon_UpLv,PokemonManager.RefreshPokemonUpLvRedPoint)
|
||||
RPData:AddCheckFunc(RedPointType.Pokemon_UpStar,PokemonManager.RefreshPokemonUpStarRedPoint)
|
||||
|
|
|
@ -12,8 +12,10 @@ this.luckyTurnTableRewards={}
|
|||
this.luckyluckyTurnTableTimes = 0
|
||||
this.luckyluckyTurnTableRemainTime = 0
|
||||
|
||||
this.first = true
|
||||
--打开逍遥游地图列表界面
|
||||
function this.OpenMapList()
|
||||
this.first = false
|
||||
this.GetOpenMapData(function(_data)
|
||||
local XiaoYaoMapPanel = UIManager.GetOpenPanel(UIName.XiaoYaoMapPanel)
|
||||
if XiaoYaoMapPanel then
|
||||
|
@ -26,14 +28,11 @@ end
|
|||
function this.GetOpenMapData(func)
|
||||
NetManager.JourneyGetInfoResponse(function (msg)
|
||||
local _data={}
|
||||
Log(#msg.infos)
|
||||
for i = 1, #msg.infos do
|
||||
Log("mapId:"..msg.infos[i].mapId..",process:"..msg.infos[i].process..",redpoint:"..msg.infos[i].redPoint)
|
||||
_data[msg.infos[i].mapId]={}
|
||||
_data[msg.infos[i].mapId].process=msg.infos[i].process
|
||||
_data[msg.infos[i].mapId].redPoint=msg.infos[i].redPoint
|
||||
_data[msg.infos[i].mapId].first=msg.infos[i].first
|
||||
Log("逍遥游红点数据,mapid:"..msg.infos[i].mapId..",redPoint:"..msg.infos[i].redPoint)
|
||||
end
|
||||
this.allMapData=_data
|
||||
if func then
|
||||
|
@ -64,8 +63,7 @@ function this.OpenXiaoYaoMap(mapId,func)
|
|||
this.GetHeroIndex = 0
|
||||
this.InitLuckyTurnTables(msg)
|
||||
this.InitMonsterData(msg.monsterInfo,1)
|
||||
this.InitHeroData(msg.goodsInfo,1)
|
||||
Log("打开逍遥游地图界面")
|
||||
this.InitHeroData(msg.goodsInfo,1)
|
||||
UIManager.OpenPanel(UIName.XiaoYaoMapPanel,curMapData)
|
||||
if func then
|
||||
func()
|
||||
|
@ -79,15 +77,17 @@ function this.StartXiaoYao()
|
|||
--0、普通节点 1、奖励节点 2、双倍节点 3、额外骰子节点 4、招募英雄节点 5、怪物节点 6,转盘
|
||||
if msg.pathType == 5 then
|
||||
this.InitMonsterData(msg.monster,2)
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(this.curMapId),tostring(3)),1)
|
||||
this.CheckRedPoint()
|
||||
elseif msg.pathType == 6 then
|
||||
this.InitLuckyTurnTables(msg)
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(this.curMapId),tostring(2)),1)
|
||||
this.CheckRedPoint()
|
||||
elseif msg.pathType == 4 then
|
||||
this.InitHeroData(msg.goodsInfo,2)
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(this.curMapId),tostring(1)),1)
|
||||
this.CheckRedPoint()
|
||||
elseif msg.pathType == 0 then
|
||||
LogRed("#msg.Drop:"..#msg.drop.itemlist)
|
||||
LogRed("#msg.Drop1:"..#msg.drop.equipId )
|
||||
LogRed("#msg.Drop2:"..#msg.drop.Hero )
|
||||
LogRed("#msg.Drop3:"..#msg.drop.soulEquip )
|
||||
end
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.XiaoYao.StartXiaoYao, msg)
|
||||
end)
|
||||
|
@ -129,16 +129,21 @@ function this.InitLuckyTurnTables(msg)
|
|||
else
|
||||
this.luckyluckyTurnTableTimes = this.luckyluckyTurnTableTimes - 1
|
||||
end
|
||||
if this.luckyluckyTurnTableTimes < 1 then
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(this.curMapId),tostring(2)),0)
|
||||
this.CheckRedPoint()
|
||||
end
|
||||
end
|
||||
LogGreen("幸运转盘奖励个数:"..#this.luckyTurnTableRewards)
|
||||
LogGreen("幸运转盘剩余次数:"..this.luckyluckyTurnTableTimes)
|
||||
LogGreen("幸运转盘剩余时间:"..this.luckyluckyTurnTableRemainTime)
|
||||
end
|
||||
|
||||
function this.UpdateLuckyTurnTables()
|
||||
this.luckyTurnTableRewards = {}
|
||||
this.luckyluckyTurnTableRemainTime = 0
|
||||
this.luckyluckyTurnTableTimes = 0
|
||||
if this.luckyluckyTurnTableTimes < 1 then
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(this.curMapId),tostring(2)),0)
|
||||
this.CheckRedPoint()
|
||||
end
|
||||
end
|
||||
|
||||
-- type 1初始化 2添加 hero
|
||||
|
@ -150,7 +155,6 @@ function this.InitHeroData(goodsInfo,type)
|
|||
hero.goodsId = goodsInfo[i].goodsId
|
||||
hero.goodsIndex = goodsInfo[i].goodsIndex
|
||||
hero.remainTime = goodsInfo[i].remainTime
|
||||
LogGreen("hero.goodsId :"..hero.goodsId .." hero.goodsIndex:"..hero.goodsIndex.." hero.remainTime"..hero.remainTime)
|
||||
table.insert(this.HeroData,hero)
|
||||
end
|
||||
elseif type == 2 then
|
||||
|
@ -158,13 +162,11 @@ function this.InitHeroData(goodsInfo,type)
|
|||
hero.goodsId = goodsInfo.goodsId
|
||||
hero.goodsIndex = goodsInfo.goodsIndex
|
||||
hero.remainTime = goodsInfo.remainTime
|
||||
LogGreen("hero.goodsId :"..hero.goodsId .." hero.goodsIndex:"..hero.goodsIndex.." hero.remainTime"..hero.remainTime)
|
||||
table.insert(this.HeroData,hero)
|
||||
end
|
||||
table.sort(this.HeroData,function(a,b)
|
||||
return a.goodsIndex > b.goodsIndex
|
||||
end)
|
||||
LogGreen("招募英雄个数"..#this.HeroData)
|
||||
end
|
||||
|
||||
function this.GetHeroDatas()
|
||||
|
@ -184,7 +186,6 @@ function this.InitHeroData(goodsInfo,type)
|
|||
table.sort(this.HeroData,function(a,b)
|
||||
return a.goodsIndex > b.goodsIndex
|
||||
end)
|
||||
LogGreen("得到的招募数量:"..#this.HeroData)
|
||||
return this.HeroData
|
||||
end
|
||||
|
||||
|
@ -200,6 +201,8 @@ function this.UpdateHeroData(id)
|
|||
--获取招募时间
|
||||
function this.GetHeroDataTime()
|
||||
if not this.HeroData or #this.HeroData < 1 then
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(this.curMapId),tostring(1)),0)
|
||||
this.CheckRedPoint()
|
||||
return 0,0
|
||||
end
|
||||
for i,v in ipairs(this.HeroData) do
|
||||
|
@ -208,7 +211,7 @@ function this.UpdateHeroData(id)
|
|||
this.GetHeroIndex = 0
|
||||
end
|
||||
table.remove(this.HeroData,i)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
table.sort(this.HeroData,function(a,b)
|
||||
|
@ -229,13 +232,6 @@ function this.InitMonsterData(BackMonsterDatas,type)
|
|||
monster.remainTime = BackMonsterDatas[i].remainTime
|
||||
monster.attackNum = BackMonsterDatas[i].attackNum
|
||||
monster.reward = BackMonsterDatas[i].rewardShow
|
||||
LogGreen("---------------------------------------")
|
||||
LogGreen("monster.monsterId"..BackMonsterDatas[i].monsterId)
|
||||
LogGreen("monster.monsterIndex"..BackMonsterDatas[i].monsterIndex)
|
||||
LogGreen("monster.monsterHp"..BackMonsterDatas[i].monsterHp)
|
||||
LogGreen("monster.remainTime"..BackMonsterDatas[i].remainTime)
|
||||
LogGreen("monster.attackNum"..BackMonsterDatas[i].attackNum)
|
||||
LogGreen("monster.reward"..BackMonsterDatas[i].rewardShow)
|
||||
table.insert(this.MonsterData,monster)
|
||||
end
|
||||
elseif type == 2 then
|
||||
|
@ -246,19 +242,8 @@ function this.InitMonsterData(BackMonsterDatas,type)
|
|||
monster.remainTime = BackMonsterDatas.remainTime
|
||||
monster.attackNum = BackMonsterDatas.attackNum
|
||||
monster.reward = BackMonsterDatas.rewardShow
|
||||
LogGreen("---------------------------------------")
|
||||
LogGreen("monster.monsterId"..BackMonsterDatas.monsterId)
|
||||
LogGreen("monster.monsterIndex"..BackMonsterDatas.monsterIndex)
|
||||
LogGreen("monster.monsterHp"..BackMonsterDatas.monsterHp)
|
||||
LogGreen("monster.remainTime"..BackMonsterDatas.remainTime)
|
||||
LogGreen("monster.attackNum"..BackMonsterDatas.attackNum)
|
||||
LogGreen("monster.reward"..BackMonsterDatas.rewardShow)
|
||||
table.insert(this.MonsterData,monster)
|
||||
end
|
||||
for i = 1, #this.MonsterData do
|
||||
LogYellow("monster.monsterId:"..this.MonsterData[i].monsterId)
|
||||
end
|
||||
LogGreen("boss个数"..#this.MonsterData)
|
||||
end
|
||||
|
||||
--刷新
|
||||
|
@ -268,19 +253,17 @@ function this.InitMonsterData(BackMonsterDatas,type)
|
|||
table.remove(this.MonsterData,i)
|
||||
break
|
||||
elseif BackMonsterData and BackMonsterData.monsterIndex == v.monsterIndex then
|
||||
LogRed( "BackMonsterData.monsterHp-------------------------:"..BackMonsterData.monsterHp)
|
||||
v.monsterHp = BackMonsterData.monsterHp
|
||||
v.attackNum = BackMonsterData.attackNum
|
||||
break
|
||||
end
|
||||
end
|
||||
for i,v in ipairs(this.MonsterData) do
|
||||
LogRed("怪物数量:"..#this.MonsterData)
|
||||
end
|
||||
end
|
||||
|
||||
function this.GetMonsterDatas()
|
||||
if not this.MonsterData or #this.MonsterData < 1 then
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(this.curMapId),tostring(3)),0)
|
||||
this.CheckRedPoint()
|
||||
return nil
|
||||
end
|
||||
for i,v in ipairs(this.MonsterData) do
|
||||
|
@ -294,7 +277,6 @@ function this.InitMonsterData(BackMonsterDatas,type)
|
|||
table.sort(this.MonsterData,function(a,b)
|
||||
return a.monsterIndex > b.monsterIndex
|
||||
end)
|
||||
LogGreen("得到的怪物数量:"..#this.MonsterData)
|
||||
return this.MonsterData
|
||||
end
|
||||
|
||||
|
@ -363,14 +345,40 @@ function this.GameOperate(func)
|
|||
end
|
||||
|
||||
--检测逍遥游红点
|
||||
function this.CheckRedPoint()
|
||||
function this.CheckRedPoint(mapId,eventId)
|
||||
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.XiaoYaoYou) then
|
||||
return false
|
||||
end
|
||||
if eventId and eventId > 0 and mapId and mapId > 0 then
|
||||
if PlayerPrefs.GetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(mapId),tostring(eventId))) == 1 then
|
||||
if eventId == 1 and #this.GetHeroDatas() > 0 then
|
||||
return true
|
||||
elseif eventId == 2 and this.luckyluckyTurnTableTimes > 0 then
|
||||
return true
|
||||
elseif eventId == 3 and #this.GetMonsterDatas() > 0 then
|
||||
return true
|
||||
end
|
||||
else
|
||||
return false
|
||||
end
|
||||
else
|
||||
if mapId and mapId > 0 then
|
||||
for i = 1 , 3 do
|
||||
if PlayerPrefs.GetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(mapId),tostring(i))) == 1 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
end
|
||||
if BagManager.GetItemCountById(UpViewRechargeType.YunYouVle)>=PrivilegeManager.GetPrivilegeNumber(39) then
|
||||
return true
|
||||
end
|
||||
|
||||
end
|
||||
for k, v in pairs(this.allMapData) do
|
||||
if v.redPoint==1 then
|
||||
return true
|
||||
for i = 1 , 3 do
|
||||
if PlayerPrefs.GetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(k),tostring(i))) == 1 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
|
|
|
@ -21,7 +21,6 @@ local isPlayMove=0
|
|||
local targetBtn
|
||||
local costNum --每次摇骰子消耗道具数量
|
||||
local saiziImage={"x_xiaoyaoyou_saizi_01","x_xiaoyaoyou_saizi_02","x_xiaoyaoyou_saizi_03","x_xiaoyaoyou_saizi_04","x_xiaoyaoyou_saizi_05","x_xiaoyaoyou_saizi_06"}
|
||||
|
||||
--初始化组件(用于子类重写)
|
||||
function this:InitComponent()
|
||||
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform)
|
||||
|
@ -32,14 +31,17 @@ function this:InitComponent()
|
|||
this.shopTime=Util.GetGameObject(self.gameObject, "btnGrid/shopBtn/time"):GetComponent("Text")
|
||||
this.shopNum=Util.GetGameObject(self.gameObject, "btnGrid/shopBtn/num/Text"):GetComponent("Text")
|
||||
Util.GetGameObject(self.gameObject, "btnGrid/shopBtn/btnName"):GetComponent("Text").text="东海寻仙"
|
||||
this.shopRedPoint =Util.GetGameObject(self.gameObject, "btnGrid/shopBtn/redPoint")
|
||||
this.rouleBtn = Util.GetGameObject(self.gameObject, "btnGrid/rouleBtn")
|
||||
this.rouleTime=Util.GetGameObject(self.gameObject, "btnGrid/rouleBtn/time"):GetComponent("Text")
|
||||
this.rouleNum=Util.GetGameObject(self.gameObject, "btnGrid/rouleBtn/num/Text"):GetComponent("Text")
|
||||
Util.GetGameObject(self.gameObject, "btnGrid/rouleBtn/btnName"):GetComponent("Text").text="幸运转盘"
|
||||
this.rouleRedPoint = Util.GetGameObject(self.gameObject, "btnGrid/rouleBtn/redPoint")
|
||||
this.bossBtn = Util.GetGameObject(self.gameObject, "btnGrid/bossBtn")
|
||||
this.bossTime=Util.GetGameObject(self.gameObject, "btnGrid/bossBtn/time"):GetComponent("Text")
|
||||
this.bossNum=Util.GetGameObject(self.gameObject, "btnGrid/bossBtn/num/Text"):GetComponent("Text")
|
||||
Util.GetGameObject(self.gameObject, "btnGrid/bossBtn/btnName"):GetComponent("Text").text="幻魔入侵"
|
||||
this.bossRedPoint = Util.GetGameObject(self.gameObject, "btnGrid/bossBtn/redPoint")
|
||||
this.previewBtn=Util.GetGameObject(self.gameObject, "previewBtn")
|
||||
this.autoBtn=Util.GetGameObject(self.gameObject, "auto")--自动游历按钮
|
||||
this.toggle=Util.GetGameObject(self.gameObject, "auto/toggle")--自动游历开关显示
|
||||
|
@ -75,6 +77,7 @@ function this:InitComponent()
|
|||
this.oneSaiZiEffect=Util.GetGameObject(self.gameObject, "saizi/EFFECT_UI_SHaiZi_DanZi")
|
||||
this.twoSaiZiEffect=Util.GetGameObject(self.gameObject, "saizi/EFFECT_UI_SHaiZi_ShuangZi")
|
||||
|
||||
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -93,11 +96,13 @@ function this:BindEvent()
|
|||
self:ClosePanel()
|
||||
end)
|
||||
--商店点击
|
||||
Util.AddClick(this.shopBtn, function ()
|
||||
Util.AddClick(this.shopBtn, function ()
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(XiaoYaoManager.curMapId),tostring(1)),0)
|
||||
UIManager.OpenPanel(UIName.XiaoyaoHeroGetPopup)
|
||||
end)
|
||||
--转盘点击
|
||||
Util.AddClick(this.rouleBtn, function ()
|
||||
Util.AddClick(this.rouleBtn, function ()
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(XiaoYaoManager.curMapId),tostring(2)),0)
|
||||
-- local grids={{index=3,gName="ccc"},{index=5,gName="eee"},{index=2,gName="bbb"},{index=4,gName="ddd"}}
|
||||
-- table.sort(grids,function(a,b)
|
||||
-- return a.index < b.index
|
||||
|
@ -108,7 +113,8 @@ function this:BindEvent()
|
|||
UIManager.OpenPanel(UIName.XiaoYaoLuckyTurnTablePopup)
|
||||
end)
|
||||
--boss点击事件
|
||||
Util.AddClick(this.bossBtn, function ()
|
||||
Util.AddClick(this.bossBtn, function ()
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(XiaoYaoManager.curMapId),tostring(3)),0)
|
||||
UIManager.OpenPanel(UIName.XiaoYaoLuckyBossPopup)
|
||||
end)
|
||||
--奖励预览
|
||||
|
@ -179,30 +185,32 @@ function this:RemoveListener()
|
|||
Game.GlobalEvent:RemoveEvent(GameEvent.XiaoYao.PlayEventEffect, this.PlayEffect)
|
||||
end
|
||||
|
||||
--刷新界面事件入口按钮显示隐藏
|
||||
function this.RefreshEventBtn()
|
||||
this.UpdateYunYouVleShow()
|
||||
if XiaoYaoManager.luckyluckyTurnTableTimes > 0 and (XiaoYaoManager.luckyluckyTurnTableRemainTime - PlayerManager.serverTime > 0) then
|
||||
this.rouleBtn:SetActive(true)
|
||||
else
|
||||
this.rouleBtn:SetActive(false)
|
||||
end
|
||||
local temp = XiaoYaoManager.GetMonsterDatas()
|
||||
if temp and #temp > 0 then
|
||||
this.bossBtn:SetActive(true)
|
||||
else
|
||||
this.bossBtn:SetActive(false)
|
||||
end
|
||||
local temp = XiaoYaoManager.GetHeroDatas()
|
||||
if temp and #temp > 0 then
|
||||
this.shopBtn:SetActive(true)
|
||||
else
|
||||
this.shopBtn:SetActive(false)
|
||||
end
|
||||
shopLeftTimes,shopLeftTime=XiaoYaoManager.GetHeroDataTime()
|
||||
rouleLeftTime=XiaoYaoManager.luckyluckyTurnTableRemainTime
|
||||
bossLeftTime,bossLeftTime=XiaoYaoManager.GetMonsterDataReMainTimesAndTime()
|
||||
end
|
||||
-- --刷新界面事件入口按钮显示隐藏
|
||||
-- function this.RefreshEventBtn()
|
||||
-- this.UpdateYunYouVleShow()
|
||||
--
|
||||
|
||||
-- if XiaoYaoManager.luckyluckyTurnTableTimes > 0 and (XiaoYaoManager.luckyluckyTurnTableRemainTime - PlayerManager.serverTime > 0) then
|
||||
-- this.rouleBtn:SetActive(true)
|
||||
-- else
|
||||
-- this.rouleBtn:SetActive(false)
|
||||
-- end
|
||||
-- local temp = XiaoYaoManager.GetMonsterDatas()
|
||||
-- if temp and #temp > 0 then
|
||||
-- this.bossBtn:SetActive(true)
|
||||
-- else
|
||||
-- this.bossBtn:SetActive(false)
|
||||
-- end
|
||||
-- local temp = XiaoYaoManager.GetHeroDatas()
|
||||
-- if temp and #temp > 0 then
|
||||
-- this.shopBtn:SetActive(true)
|
||||
-- else
|
||||
-- this.shopBtn:SetActive(false)
|
||||
-- end
|
||||
-- shopLeftTimes,shopLeftTime=XiaoYaoManager.GetHeroDataTime()
|
||||
-- rouleLeftTime=XiaoYaoManager.luckyluckyTurnTableRemainTime
|
||||
-- bossLeftTime,bossLeftTime=XiaoYaoManager.GetMonsterDataReMainTimesAndTime()
|
||||
-- end
|
||||
---播放骰子动效
|
||||
function this.PlaySaiziAnim(_data)
|
||||
this.startBtn:GetComponent("Button").enabled=false
|
||||
|
@ -492,6 +500,9 @@ function this.InitShowEvent()
|
|||
end
|
||||
--刷新界面事件入口按钮显示隐藏
|
||||
function this.RefreshEventBtn()
|
||||
this.bossRedPoint:SetActive(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,1))
|
||||
this.rouleRedPoint:SetActive(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,2))
|
||||
this.shopRedPoint:SetActive(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,3))
|
||||
if XiaoYaoManager.luckyluckyTurnTableTimes > 0 and (XiaoYaoManager.luckyluckyTurnTableRemainTime - PlayerManager.serverTime > 0) then
|
||||
this.rouleBtn:SetActive(true)
|
||||
else
|
||||
|
|
|
@ -94,9 +94,7 @@ function this.RefreshShow(data)
|
|||
Log("当前mapid:"..config.MapID)
|
||||
Log("index"..index)
|
||||
if data[config.MapID]~=nil then
|
||||
Log("data[index].redPoint"..data[config.MapID].redPoint)
|
||||
_progress=data[config.MapID].process
|
||||
isShowRed=data[config.MapID].redPoint==1
|
||||
if data[config.MapID].first==1 then
|
||||
showReward = ConfigManager.GetConfigData(ConfigName.RewardGroup,config.FinalReward).ShowItem
|
||||
end
|
||||
|
@ -111,7 +109,6 @@ function this.RefreshShow(data)
|
|||
progress=_progress,
|
||||
passReward=showReward[1],
|
||||
unlockLevel = config.UnlockLevel,
|
||||
redPoint=isShowRed
|
||||
}
|
||||
_allData[index]=_singleData
|
||||
end
|
||||
|
@ -162,11 +159,11 @@ function this.SingleDataShow(btn, go, data, index)
|
|||
XiaoYaoManager.OpenXiaoYaoMap(data.mapId)
|
||||
end
|
||||
end)
|
||||
redPoint:SetActive(data.redPoint)
|
||||
Log("isUnLock值:"..tostring(data.isUnLock))
|
||||
redPoint:SetActive(XiaoYaoManager.CheckRedPoint(data.mapId))
|
||||
-- lock:SetActive(not data.isUnLock)
|
||||
name.text=data.mapName
|
||||
if data.isUnLock then
|
||||
Util.SetGray(go,false)
|
||||
tip.text = "云\n游\n进\n度"
|
||||
tip2.text = ""
|
||||
local prog=data.progress < 100 and data.progress or 0
|
||||
|
@ -176,6 +173,7 @@ function this.SingleDataShow(btn, go, data, index)
|
|||
end
|
||||
num.text = string.format("%u\n%%",prog)
|
||||
else
|
||||
Util.SetGray(go,true)
|
||||
if data.unlockLevel < 0 then
|
||||
tip.text = "敬\n请\n期\n待"
|
||||
tip2.text = ""
|
||||
|
|
Loading…
Reference in New Issue