[数字游戏]======红点修改提交
parent
f22058cbe2
commit
b0dfb411b8
|
@ -14583,6 +14583,7 @@ RectTransform:
|
|||
- {fileID: 859333462040678006}
|
||||
- {fileID: 4319010319801327870}
|
||||
- {fileID: 8904232177582327412}
|
||||
- {fileID: 1919961734980373170}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -102885,7 +102886,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: -0.000030517578, y: -14.779999}
|
||||
m_AnchoredPosition: {x: 0, y: -14.779999}
|
||||
m_SizeDelta: {x: 0, y: 100}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &3246916965527716238
|
||||
|
@ -122428,6 +122429,123 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &5030930055680579201
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1919961734980373170}
|
||||
- component: {fileID: 5037213917556676669}
|
||||
- component: {fileID: 1662271002037356129}
|
||||
- component: {fileID: 3456625499830639649}
|
||||
m_Layer: 5
|
||||
m_Name: btn_help
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1919961734980373170
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5030930055680579201}
|
||||
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: 860078813220162614}
|
||||
m_RootOrder: 8
|
||||
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: 486, y: 811}
|
||||
m_SizeDelta: {x: 68, y: 68}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5037213917556676669
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5030930055680579201}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &1662271002037356129
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5030930055680579201}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, 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_Sprite: {fileID: 21300000, guid: 47b0d71d3c8ef79468a5fb4d8ec5f365, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!114 &3456625499830639649
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5030930055680579201}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 1662271002037356129}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
--- !u!1 &5228894046032341962
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -1065,12 +1065,13 @@ RedPointType = {
|
|||
FestevalRed = 9501,
|
||||
EightLoginReward=9502,--八日登陆红点
|
||||
zhognzhichengcheng = 10096,
|
||||
|
||||
numberGame = 10097,
|
||||
eastSeaFindGod = 98000,
|
||||
eastSeaFindGod1 = 98004,
|
||||
eastSeaFindGod2 = 98005,
|
||||
eastSeaFindGod3 = 98006,
|
||||
eastSeaFindGod4 = 98007,
|
||||
|
||||
}
|
||||
|
||||
RedPointStatus = {
|
||||
|
|
|
@ -222,16 +222,16 @@ local ManagerNames = {
|
|||
"LingMaiMiJing/LingMaiMiJingManager",
|
||||
--命格
|
||||
"Gem/GemManager",
|
||||
"TreasureOfHeaven/RecruitTreasureManager",
|
||||
"HomeLand/HomeLandManager",
|
||||
"Explore/ExploreManager",
|
||||
--!!!!红点管理(尽量放在最后)!!!!--
|
||||
"Player/RedpotManager",
|
||||
--魂印管理
|
||||
"GodPrint/GodPrintManager",
|
||||
--数字游戏管理
|
||||
"RatioNumber/RatioNumberLevelManager",
|
||||
"RatioNumber/RatioNumberManager",
|
||||
"TreasureOfHeaven/RecruitTreasureManager",
|
||||
"HomeLand/HomeLandManager",
|
||||
"Explore/ExploreManager",
|
||||
--魂印管理
|
||||
"GodPrint/GodPrintManager",
|
||||
--!!!!红点管理(尽量放在最后)!!!!--
|
||||
"Player/RedpotManager",
|
||||
}
|
||||
|
||||
return ManagerNames
|
|
@ -215,6 +215,7 @@ function FightPointPassMainPanel:InitComponent()
|
|||
this.funcBtnList[FUNCTION_OPEN_TYPE.XiaoYaoYou] = this.btnXiaoYao
|
||||
--数字游戏按钮
|
||||
this.numberGameBtn=Util.GetGameObject(self.gameObject,"Bg/RightUpVertical/numberGameBtn")
|
||||
this.numberGameRed=Util.GetGameObject(self.gameObject,"Bg/RightUpVertical/numberGameBtn/redPoint")
|
||||
this.funcBtnList[FUNCTION_OPEN_TYPE.Number_Game] = this.numberGameBtn
|
||||
--解锁功能
|
||||
this.openFun = Util.GetGameObject(self.gameObject, "Bg/RightUpVertical/openFun")
|
||||
|
@ -309,7 +310,7 @@ function FightPointPassMainPanel:BindEvent()
|
|||
end)
|
||||
--数字游戏
|
||||
Util.AddClick(this.numberGameBtn,function()
|
||||
RatioNumberManager.SelectInit()
|
||||
--RatioNumberManager.SelectInit()
|
||||
UIManager.OpenPanel(UIName.RatioNumberLevelPanel)
|
||||
end)
|
||||
Util.AddClick(this.btnOpenSeverWelfare, function()
|
||||
|
@ -341,6 +342,7 @@ function FightPointPassMainPanel:BindEvent()
|
|||
BindRedPointObject(RedPointType.SecretTer_IsCanFight, this.fightRP)
|
||||
BindRedPointObject(RedPointType.XiaoYaoYouRedPoint, this.xiaoyaoRedPoint)
|
||||
BindRedPointObject(RedPointType.FirstRecharge, this.firstRedPoint)
|
||||
BindRedPointObject(RedPointType.numberGame, this.numberGameRed)
|
||||
-- BindRedPointObject(RedPointType.FightLevel, this.btnFightLevelRedPoint)
|
||||
end
|
||||
|
||||
|
@ -416,6 +418,7 @@ end
|
|||
-- 从战斗出来会加载两次
|
||||
function FightPointPassMainPanel:OnShow()
|
||||
CheckRedPointStatus(RedPointType.XiaoYaoYouRedPoint)
|
||||
CheckRedPointStatus(RedPointType.numberGame)
|
||||
local activityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.FirstRecharge)
|
||||
if activityId and activityId~=0 and DynamicActivityManager.IsQualifiled(1) then
|
||||
this.btnFirstRechar:SetActive(true)
|
||||
|
@ -618,6 +621,7 @@ end
|
|||
--按钮开启限制
|
||||
function this.BtnsIsOpen()
|
||||
for i, v in pairs(this.funcBtnList) do
|
||||
LogError("i==="..i)
|
||||
local isOpen = ActTimeCtrlManager.SingleFuncState(i)
|
||||
v:SetActive(isOpen)
|
||||
end
|
||||
|
@ -835,6 +839,7 @@ function FightPointPassMainPanel:OnDestroy()
|
|||
ClearRedPointObject(RedPointType.DailyTaskMain, this.dailyRedPoint)
|
||||
ClearRedPointObject(RedPointType.SecretTer_IsCanFight, this.fightRP)
|
||||
ClearRedPointObject(RedPointType.XiaoYaoYouRedPoint, this.xiaoyaoRedPoint)
|
||||
ClearRedPointObject(RedPointType.numberGame,this.numberGameBtn)
|
||||
ClearRedPointObject(RedPointType.FirstRecharge, this.firstRedPoint)
|
||||
-- ClearRedPointObject(RedPointType.FightLevel, this.btnFightLevelRedPoint)
|
||||
-- 头像层级
|
||||
|
|
|
@ -177,6 +177,7 @@ function this.InitRedPointAllRelate()
|
|||
RPData:SetParent(RedPointType.SecretTer_MaxBoxReward, RedPointType.SecretTer)
|
||||
RPData:SetParent(RedPointType.SecretTer_HaveFreeTime, RedPointType.SecretTer)
|
||||
RPData:SetParent(RedPointType.SecretTer_IsCanFight, RedPointType.SecretTer)
|
||||
RPData:SetParent(RedPointType.numberGame, RedPointType.SecretTer)
|
||||
--逍遥游
|
||||
RPData:SetParent(RedPointType.XiaoYaoYouRedPoint, RedPointType.SecretTer)
|
||||
-- 外敌
|
||||
|
@ -684,6 +685,8 @@ function this.RegisterRedCheckFunc()
|
|||
RPData:AddCheckFunc(RedPointType.eastSeaFindGod2,CommonActPageManager.GetRedPointEastSeaFindGodnew)
|
||||
RPData:AddCheckFunc(RedPointType.eastSeaFindGod3,CommonActPageManager.GetRedPointEastSeaFindGodnew)
|
||||
RPData:AddCheckFunc(RedPointType.eastSeaFindGod4,CommonActPageManager.GetRedPointEastSeaFindGodnew)
|
||||
--数字游戏
|
||||
RPData:AddCheckFunc(RedPointType.numberGame,RatioNumberManager.CheckRedPoint)
|
||||
end
|
||||
|
||||
-- 向红点绑定物体
|
||||
|
|
|
@ -68,6 +68,12 @@ function this.GetCurChapter()
|
|||
return index
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return RatioNumberLevelManager
|
||||
|
||||
|
||||
|
|
|
@ -57,6 +57,8 @@ function RatioNumberLevelPanel:InitComponent()
|
|||
this.box = Util.GetGameObject(self.gameObject,"chapterBtn/tabbox/box")
|
||||
this.bgImg = Util.GetGameObject(self.gameObject,"bg"):GetComponent("Image")
|
||||
this.titleImg = Util.GetGameObject(self.gameObject,"title"):GetComponent("Image")
|
||||
this.btn_help = Util.GetGameObject(self.gameObject,"btn_help")
|
||||
this.helpPosition= this.btn_help:GetComponent("RectTransform").localPosition
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -66,6 +68,9 @@ function RatioNumberLevelPanel:BindEvent()
|
|||
self:ClosePanel()
|
||||
UIManager.OpenPanel(UIName.FightPointPassMainPanel)
|
||||
end)
|
||||
Util.AddOnceClick(this.btn_help, function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup,131,this.helpPosition.x,this.helpPosition.y)
|
||||
end)
|
||||
-- Util.AddClick(this.leftBtnClick, function()
|
||||
-- this.LeftOrRightBtnClickEvent(1)
|
||||
-- end)
|
||||
|
@ -98,8 +103,9 @@ end
|
|||
|
||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function RatioNumberLevelPanel:OnShow()
|
||||
|
||||
chapterId = RatioNumberManager.selectChapterId
|
||||
|
||||
--LogError("RatioNumberManager.levelId=="..RatioNumberManager.levelId)
|
||||
-- SoundManager.PlayMusic(SoundChapterConfig[chapterId])
|
||||
if mainPointList then
|
||||
this.LevelShowHandle_UP()
|
||||
|
@ -616,11 +622,14 @@ function this.SetlevelBox()
|
|||
end
|
||||
local reward = RatioNumberLevelManager.GetChapterReward()
|
||||
local curRardId = RatioNumberManager.chapterId * 1000 + RatioNumberManager.levelId - 1
|
||||
--LogError("RatioNumberManager.chapterId=="..RatioNumberManager.chapterId.." RatioNumberManager.levelId== "..RatioNumberManager.levelId)
|
||||
for i=1, 3 do
|
||||
local rewardArr = reward[i]
|
||||
local rewardID = rewardArr[2]
|
||||
--LogError("RatioNumberManager.selectChapterId=="..RatioNumberManager.selectChapterId)
|
||||
local index = RatioNumberManager.selectChapterId * 1000 + rewardArr[1]
|
||||
local rewardState = RatioNumberManager.GetRewardState(index)
|
||||
--LogError("index=="..index.." rewardState=="..tostring(rewardState).." currewardID=="..curRardId)
|
||||
boxList[i]:SetActive(true)
|
||||
Util.GetGameObject(boxList[i], "getFinish"):SetActive(rewardState)
|
||||
Util.GetGameObject(boxList[i], "redPoint"):SetActive(curRardId >= index and not rewardState)
|
||||
|
|
|
@ -35,6 +35,7 @@ this.enemyResStr = {
|
|||
|
||||
function RatioNumberManager.Init(msg)
|
||||
local num = msg.levelId
|
||||
|
||||
this.gameIndex = msg.levelId
|
||||
this.chapterId = math.floor(num/16)
|
||||
this.levelId = num%16
|
||||
|
@ -44,7 +45,8 @@ function RatioNumberManager.Init(msg)
|
|||
this.chapterId =this.chapterId + 1
|
||||
end
|
||||
this.rewardIdArr = msg.rewardIdArr
|
||||
|
||||
RatioNumberManager.SelectInit()
|
||||
--LogError("num==="..num.." this.chapterId=="..this.chapterId.." this.levelId=="..this.levelId)
|
||||
end
|
||||
|
||||
function RatioNumberManager.SelectInit()
|
||||
|
@ -86,6 +88,46 @@ function RatioNumberManager.GetCurGameInxed()
|
|||
return (this.selectChapterId - 1) * 16 + this.selectLevelId
|
||||
end
|
||||
|
||||
|
||||
function this.CheckRedPoint()
|
||||
local isShow=false
|
||||
--判断有没有打关卡
|
||||
if not CheckFunctionOpen(FUNCTION_OPEN_TYPE.Number_Game) then
|
||||
return false
|
||||
end
|
||||
local curLevel=RatioNumberLevelManager.GetChapterLevelInfo(this.chapterId,this.levelId )
|
||||
if curLevel then
|
||||
local tj=curLevel.LevelLimit
|
||||
local isTrue=true
|
||||
for i = 1, #tj do
|
||||
if tj[i] and tj[i][1]~=0 then
|
||||
if tj[i][1] == 1 then
|
||||
if PlayerManager.level < tj[i][2] then
|
||||
isTrue=false
|
||||
end
|
||||
elseif tj[i][1] == 2 then --没有关卡限制界面关卡没有卡
|
||||
if FightPointPassManager.curOpenFight <= tj[i][2] then
|
||||
isTrue=false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
isShow=isTrue
|
||||
end
|
||||
local reward = RatioNumberLevelManager.GetChapterReward()
|
||||
local curRardId = RatioNumberManager.chapterId * 1000 + RatioNumberManager.levelId - 1
|
||||
for i = 1,RatioNumberManager.chapterId do
|
||||
for j=1, 3 do
|
||||
local rewardArr = reward[j]
|
||||
--local rewardID = rewardArr[2]
|
||||
local index = i * 1000 + rewardArr[1]
|
||||
local rewardState = RatioNumberManager.GetRewardState(index)
|
||||
--LogError("index=="..index.." rewardState=="..tostring(rewardState).." currewardID=="..curRardId)
|
||||
if rewardState==false and index<=curRardId then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
return isShow
|
||||
end
|
||||
|
||||
return RatioNumberManager
|
Loading…
Reference in New Issue