【山河试炼】差红点的检测
parent
8cd3afb034
commit
160a3e1a6f
|
@ -35,7 +35,7 @@ RectTransform:
|
|||
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: 144.5, y: 0}
|
||||
m_AnchoredPosition: {x: 134, y: 0}
|
||||
m_SizeDelta: {x: 66.68, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1338573791305830314
|
||||
|
@ -176,8 +176,8 @@ MonoBehaviour:
|
|||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_HorizontalOverflow: 1
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u6D3B\u52A8\u5269\u4F59\u65F6\u95F4:5\u592909\u65F6"
|
||||
LanguageIndex: 0
|
||||
|
@ -527,7 +527,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 50}
|
||||
m_SizeDelta: {x: 336.9, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5963966442030474676
|
||||
CanvasRenderer:
|
||||
|
@ -718,6 +718,7 @@ GameObject:
|
|||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3746285910407252570}
|
||||
- component: {fileID: 8715360024909288648}
|
||||
m_Layer: 0
|
||||
m_Name: reward
|
||||
m_TagString: Untagged
|
||||
|
@ -741,9 +742,32 @@ RectTransform:
|
|||
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: -21.379997, y: 0}
|
||||
m_SizeDelta: {x: 434.76, y: 130}
|
||||
m_AnchoredPosition: {x: 0, y: -10}
|
||||
m_SizeDelta: {x: 450, y: 106.8}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &8715360024909288648
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2262978897958396795}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 4
|
||||
m_Spacing: 0
|
||||
m_ChildForceExpandWidth: 0
|
||||
m_ChildForceExpandHeight: 0
|
||||
m_ChildControlWidth: 0
|
||||
m_ChildControlHeight: 0
|
||||
--- !u!1 &2567955882545508450
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1113,7 +1137,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 54, y: 48}
|
||||
m_SizeDelta: {x: 80.16, y: 48}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5286972798472470661
|
||||
CanvasRenderer:
|
||||
|
@ -1391,6 +1415,8 @@ GameObject:
|
|||
- component: {fileID: 1019011625307048480}
|
||||
- component: {fileID: 2176333781191840016}
|
||||
- component: {fileID: 4078672532392176823}
|
||||
- component: {fileID: 1606048922330101612}
|
||||
- component: {fileID: 7787099564704865632}
|
||||
m_Layer: 5
|
||||
m_Name: getBtn
|
||||
m_TagString: Untagged
|
||||
|
@ -1455,6 +1481,67 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!114 &1606048922330101612
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3685685578988546141}
|
||||
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: 3
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
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: 4078672532392176823}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
--- !u!95 &7787099564704865632
|
||||
Animator:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3685685578988546141}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000, guid: 6ffe000b5a58aac48a9d130543849d76, type: 2}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorControllerStateOnDisable: 0
|
||||
--- !u!1 &4038779862452988876
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -2643,7 +2730,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 260
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
|
|
|
@ -907,6 +907,7 @@ RedPointType = {
|
|||
HongMeng_OpenBox = 8013, -- 格子开启
|
||||
--山河社稷图
|
||||
FightLevel = 802,--山河社稷图入口
|
||||
FightLevelTrial = 8021,--山河试炼
|
||||
--化虚坛
|
||||
Huaxutan = 803,--化虚坛主界面红点
|
||||
Huaxutan_CompoundHero = 8031,--化虚坛英雄合成红点
|
||||
|
@ -1188,7 +1189,7 @@ ActivityTypeDef = {
|
|||
FifteenDayGift = 64,--十五日登陆
|
||||
YunYouShangRen = 65,--云游商人
|
||||
TaSuiLingXiao = 66, --踏碎凌霄
|
||||
ShanHeShiLian = 99,--山河试炼
|
||||
ShanHeShiLian = 68,--山河试炼
|
||||
|
||||
--主题活动
|
||||
ShengXingYouLi=50,--升星有礼(指定猎妖师进阶)
|
||||
|
@ -1625,6 +1626,7 @@ HELP_TYPE = {
|
|||
Practice = 91,--修行
|
||||
FightLevel = 92,--山河社稷图
|
||||
GuildInFo = 95,--工会信息
|
||||
ShanHeShiLian = 96,--山河试炼
|
||||
}
|
||||
|
||||
NumToComplexFont = {
|
||||
|
|
|
@ -320,6 +320,29 @@ function this.SetChapterBoxRewardData(_chapterId,_Id,_state)
|
|||
end
|
||||
|
||||
--========================= 山河试炼专用 ===============================
|
||||
function this.GetNextMissionStar()
|
||||
local data = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.ShanHeShiLian)
|
||||
local list = {}
|
||||
local configData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",data.activityId)
|
||||
for i = 1, #configData do
|
||||
if configData[i].ActivityId == data.activityId then
|
||||
if configData[i].Values[1][1] > this.GetAllChapterStars() then
|
||||
return configData[i].Values[1][1] - this.GetAllChapterStars()
|
||||
end
|
||||
end
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
function this.CheckTrialRedPoint()
|
||||
local data = CommonActPageManager.GetData(ActivityTypeDef.ShanHeShiLian)
|
||||
for i = 1, #data.rewards do
|
||||
if data.rewards[i].state == 0 and data.rewards[i].otherData.Values[1][1] <= FightLevelManager.GetAllChapterStars() then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
--=====================================================================
|
||||
|
||||
return this
|
|
@ -11,7 +11,12 @@ function FightLevelTrialPanel:InitComponent()
|
|||
self.spLoader = SpriteLoader.New()
|
||||
self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.transform)
|
||||
self.btnBack = Util.GetGameObject(self.gameObject,"BackBtn")
|
||||
|
||||
self.nextStar = Util.GetGameObject(self.gameObject,"bg/text/num"):GetComponent("Text")
|
||||
self.Text = Util.GetGameObject(self.gameObject,"bg/text/Text"):GetComponent("Text")
|
||||
self.di = Util.GetGameObject(self.gameObject,"bg/text/di")
|
||||
self.xing = Util.GetGameObject(self.gameObject,"bg/text/xing")
|
||||
|
||||
self.curStar = Util.GetGameObject(self.gameObject,"goBtn/num"):GetComponent("Text")
|
||||
self.Scroll = Util.GetGameObject(self.gameObject,"Scroll")
|
||||
self.leftTime = Util.GetGameObject(self.gameObject,"LeftTime"):GetComponent("Text")
|
||||
|
@ -27,6 +32,7 @@ function FightLevelTrialPanel:InitComponent()
|
|||
self.itemPre, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(0, 0))
|
||||
self.ScrollView.moveTween.MomentumAmount = 1
|
||||
self.ScrollView.moveTween.Strength = 2
|
||||
self.itemList = {}
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -40,7 +46,7 @@ function FightLevelTrialPanel:BindEvent()
|
|||
end)
|
||||
|
||||
Util.AddClick(self.helpBtn, function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup, HELP_TYPE.Practice, self.helpPosition.x,self.helpPosition.y)
|
||||
UIManager.OpenPanel(UIName.HelpPopup, HELP_TYPE.ShanHeShiLian, self.helpPosition.x,self.helpPosition.y)
|
||||
end)
|
||||
end
|
||||
|
||||
|
@ -64,8 +70,88 @@ end
|
|||
|
||||
function FightLevelTrialPanel:Refresh()
|
||||
self.actData = CommonActPageManager.GetData(ActivityTypeDef.ShanHeShiLian)
|
||||
FightLevelTrialPanel:SetNumbers()
|
||||
FightLevelTrialPanel:SetRewards()
|
||||
end
|
||||
|
||||
function FightLevelTrialPanel:SetNumbers()
|
||||
self.curStar.text = FightLevelManager.GetAllChapterStars()
|
||||
self.nextStar.text = FightLevelManager.GetNextMissionStar()
|
||||
|
||||
local bool = FightLevelManager.GetNextMissionStar() ~= 0
|
||||
self.nextStar.gameObject:SetActive(bool)
|
||||
self.di:SetActive(bool)
|
||||
self.xing:SetActive(bool)
|
||||
if bool then
|
||||
self.Text.text = "距离下档奖励还有"
|
||||
else
|
||||
self.Text.text = "已达成全部目标"
|
||||
end
|
||||
|
||||
--设置时间
|
||||
if self.timer then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
local time =self.actData.endTime - GetTimeStamp()
|
||||
self.leftTime.text = string.format(Language[10512].."%s",TimeToFelaxible(time))
|
||||
self.timer = Timer.New(function ()
|
||||
time = time - 1
|
||||
self.leftTime.text = string.format(Language[10512].."%s",TimeToFelaxible(time))
|
||||
if time <= 0 then
|
||||
self:ClosePanel()
|
||||
end
|
||||
end,1,-1,true)
|
||||
self.timer:Start()
|
||||
end
|
||||
|
||||
function FightLevelTrialPanel:SetRewards()
|
||||
self.ScrollView:SetData(self.actData.rewards, function (index, go)
|
||||
FightLevelTrialPanel:SingleDataShow(go, self.actData.rewards[index],index)
|
||||
end)
|
||||
end
|
||||
|
||||
function FightLevelTrialPanel:SingleDataShow(item,data,index)
|
||||
local starNum = Util.GetGameObject(item,"num"):GetComponent("Text")
|
||||
local reward = Util.GetGameObject(item,"reward")
|
||||
local getBtn = Util.GetGameObject(item,"getBtn")
|
||||
local btnImage = Util.GetGameObject(item,"getBtn"):GetComponent("Image")
|
||||
local btnText = Util.GetGameObject(item,"getBtn/Text"):GetComponent("Text")
|
||||
|
||||
local state = 0
|
||||
if data.state == 1 then
|
||||
state = 2
|
||||
elseif data.otherData.Values[1][1] > FightLevelManager.GetAllChapterStars() then
|
||||
state = 0
|
||||
else
|
||||
state = 1
|
||||
end
|
||||
|
||||
starNum.text = data.otherData.Values[1][1]
|
||||
btnImage.sprite = self.spLoader:LoadSprite(STATE[state].Img)
|
||||
btnText.text = STATE[state].text
|
||||
if not self.itemList[item] then
|
||||
self.itemList[item] = {}
|
||||
end
|
||||
for i = 1, #data.otherData.Reward do
|
||||
if not self.itemList[item][i] then
|
||||
self.itemList[item][i] = SubUIManager.Open(SubUIConfig.ItemView,reward.transform)
|
||||
end
|
||||
self.itemList[item][i]:OnOpen(false, data.otherData.Reward[i], 0.8,false,false,false,self.sortingOrder)
|
||||
end
|
||||
Util.AddOnceClick(getBtn,function ()
|
||||
if state == 0 then
|
||||
PopupTipPanel.ShowTip("请前往山河社稷图获取更多星星!")
|
||||
elseif state == 1 then
|
||||
NetManager.GetActivityRewardRequest(data.missionId,self.actData.activityId,function (_drop)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,_drop,1,function()
|
||||
FightLevelTrialPanel:Refresh()
|
||||
end)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
getBtn:GetComponent("Button").interactable = state ~= 2
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function FightLevelTrialPanel:OnClose()
|
||||
|
@ -81,6 +167,7 @@ function FightLevelTrialPanel:OnDestroy()
|
|||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
self.itemList = {}
|
||||
end
|
||||
|
||||
return FightLevelTrialPanel
|
|
@ -884,6 +884,8 @@ function this:TabBtnAction(id,actType,data)
|
|||
-- UIManager.OpenPanel(UIName.FuXingGaoZhaoPanel)
|
||||
elseif id == ActivityTypeDef.TaSuiLingXiao then
|
||||
UIManager.OpenPanel(UIName.TaSuiLingXiaoPanel)
|
||||
elseif id == ActivityTypeDef.ShanHeShiLian then--山河试炼
|
||||
UIManager.OpenPanel(UIName.FightLevelTrialPanel)
|
||||
end
|
||||
elseif actType == 2 then
|
||||
if id == FUNCTION_OPEN_TYPE.SERVER_START_GIFT then
|
||||
|
|
|
@ -536,6 +536,8 @@ function this.RegisterRedCheckFunc()
|
|||
--主角修行
|
||||
RPData:AddCheckFunc(RedPointType.Practice_upgrade,PracticeManager.PracticeCheckUpgrade,FUNCTION_OPEN_TYPE.PRACTICE)
|
||||
RPData:AddCheckFunc(RedPointType.Practice_imprint,PracticeManager.PracticeCheckImprint,FUNCTION_OPEN_TYPE.PRACTICE)
|
||||
--山河试炼
|
||||
RPData:AddCheckFunc(RedPointType.FightLevelTrial,FightLevelManager.CheckTrialRedPoint)
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue