【好友】赠送好友友情点,每点一下都会播放动画
parent
86a99f3344
commit
5ab1295c10
|
@ -2006,6 +2006,71 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &1516504437013517875
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4102831750850566289}
|
||||
- component: {fileID: 1351443488513104340}
|
||||
- component: {fileID: 8314448603778802905}
|
||||
m_Layer: 5
|
||||
m_Name: mask
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4102831750850566289
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1516504437013517875}
|
||||
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: 3217785936302008136}
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1351443488513104340
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1516504437013517875}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &8314448603778802905
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1516504437013517875}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e459a084d8e15a240b58db751097122b, 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
|
||||
--- !u!1 &1535961928131183727
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -8106,7 +8171,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3846062141729905751}
|
||||
m_RootOrder: 6
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 0}
|
||||
|
@ -8321,8 +8386,9 @@ RectTransform:
|
|||
- {fileID: 1682470200488907665}
|
||||
- {fileID: 9008100504206921991}
|
||||
- {fileID: 3541909621560369820}
|
||||
- {fileID: 4102831750850566289}
|
||||
m_Father: {fileID: 3846062141729905751}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 0}
|
||||
|
@ -10352,8 +10418,8 @@ RectTransform:
|
|||
- {fileID: 6862594919747798903}
|
||||
- {fileID: 2523378884830774546}
|
||||
- {fileID: 2037088950}
|
||||
- {fileID: 3217785936302008136}
|
||||
- {fileID: 2911906638405515869}
|
||||
- {fileID: 3217785936302008136}
|
||||
- {fileID: 53550464877346762}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
|
|
|
@ -4,11 +4,8 @@ local this = GoodFriendMainPanel
|
|||
local friendNumber = 0
|
||||
local index = 1
|
||||
local canApplyFriendsList={}
|
||||
local isPlayAnim = true
|
||||
--初始化组件(用于子类重写)
|
||||
function GoodFriendMainPanel:InitComponent()
|
||||
--this.BtView = SubUIManager.Open(SubUIConfig.BtView, self.gameObject.transform)
|
||||
--this.BtView2 = SubUIManager.Open(SubUIConfig.BtView2, self.gameObject.transform)
|
||||
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft })
|
||||
this.btnBack = Util.GetGameObject(self.gameObject, "btnBack")
|
||||
this.friendListBtn = Util.GetGameObject(self.gameObject, "switchBtn/friendListBtn")
|
||||
|
@ -55,6 +52,7 @@ function GoodFriendMainPanel:InitComponent()
|
|||
this.roleTalk4 = Util.GetGameObject(self.gameObject, "blackList/roleImage/talkImage/Text"):GetComponent("Text")
|
||||
this.titleText = Util.GetGameObject(self.gameObject, "friendSearch/titleBgImage/titleText"):GetComponent("Text")
|
||||
this.haveGetRewardNumText=Util.GetGameObject(self.gameObject, "friendList/haveGetRewardNum/haveGetRewardNumText"):GetComponent("Text")
|
||||
this.mask = Util.GetGameObject(self.gameObject, "switchBtn/mask")
|
||||
--GoodFriendManager.GetFriendInfoRequest(1)--1:好友, 2:推荐列表 3:申请列表
|
||||
--GoodFriendManager.GetFriendInfoRequest(3)--1:好友, 2:推荐列表 3:申请列表
|
||||
--GoodFriendManager.GetFriendInfoRequest(2)--1:好友, 2:推荐列表 3:申请列表
|
||||
|
@ -85,7 +83,6 @@ function GoodFriendMainPanel:InitComponent()
|
|||
this.friendApplicationRedPoint = Util.GetGameObject(self.gameObject, "switchBtn/friendApplicationBtn/friendApplicationRedPoint")
|
||||
this.friendListRedPoint = Util.GetGameObject(self.gameObject, "switchBtn/friendListBtn/friendListRedPoint")
|
||||
this.getAllRedPoint = Util.GetGameObject(self.gameObject, "friendList/bottomImage/receiveBtn/GetAllRed")
|
||||
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -213,6 +210,12 @@ end
|
|||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function GoodFriendMainPanel:OnOpen(...)
|
||||
this.isPlayAnim = false
|
||||
this.mask:SetActive(true)
|
||||
Timer.New(function ()
|
||||
this.isPlayAnim = true
|
||||
this.mask:SetActive(false)
|
||||
end,1):Start()
|
||||
index = 1
|
||||
local args = {...}
|
||||
this.isBlackPage = args[1]
|
||||
|
@ -221,20 +224,14 @@ end
|
|||
|
||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function GoodFriendMainPanel:OnShow()
|
||||
isPlayAnim = true
|
||||
--GoodFriendManager.OnRefreshDataNextDay()
|
||||
this.roleImage1:SetActive(false)
|
||||
this.roleImage2:SetActive(false)
|
||||
this.roleImage3:SetActive(false)
|
||||
this.roleImage4:SetActive(false)
|
||||
-- this:FriendListDataShow(true,true)
|
||||
this:FriendApplicationDataShow()
|
||||
-- this:FriendSearchDataShow(true,true)
|
||||
-- this:BlackListDataShow(true,true)
|
||||
this.isInRecommendPage = true
|
||||
this:OnRefreshData()
|
||||
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.GoodFriend })
|
||||
--this.BtView:OnOpen({ sortOrder = self.sortingOrder, panelType = PanelTypeView.RolePanel })
|
||||
if(not this.isBlackPage) then
|
||||
if(this.friendListRedPoint.activeSelf or (not this.friendApplicationRedPoint.activeSelf and not this.friendListRedPoint.activeSelf)) then
|
||||
this.friendListImage.sprite = Util.LoadSprite("r_hero_xuanze_001")
|
||||
|
@ -278,8 +275,6 @@ function GoodFriendMainPanel:OnShow()
|
|||
this.blackListText.text = Language[10805]
|
||||
|
||||
end
|
||||
--this.BtView2:OnOpen({ sortOrder = self.sortingOrder, panelType = PanelTypeView2.FriendPanel })
|
||||
--this.friendNumberText:GetComponent("Text").text="好友数量:"..friendNumber.."/80"
|
||||
this.BtnClickEvnet(index)
|
||||
end
|
||||
|
||||
|
@ -324,8 +319,6 @@ end
|
|||
function GoodFriendMainPanel:OnDestroy()
|
||||
|
||||
SubUIManager.Close(this.UpView)
|
||||
--SubUIManager.Close(this.BtView)
|
||||
--SubUIManager.Close(this.BtView2)
|
||||
ClearRedPointObject(RedPointType.Friend_Reward, this.friendListRedPoint)
|
||||
ClearRedPointObject(RedPointType.Friend_GetAllReward,this.getAllRedPoint)
|
||||
ClearRedPointObject(RedPointType.Friend_Application, this.friendApplicationRedPoint)
|
||||
|
@ -337,7 +330,6 @@ end
|
|||
|
||||
--好友列表循环滚动数据
|
||||
function GoodFriendMainPanel:FriendListDataShow()
|
||||
LogYellow("GoodFriendMainPanel:FriendListDataShow")
|
||||
CheckRedPointStatus(RedPointType.Friend_GetAllReward)
|
||||
this:OnRefreshData()
|
||||
local list = {}
|
||||
|
@ -365,16 +357,7 @@ function GoodFriendMainPanel:FriendListDataShow()
|
|||
this.ScrollView1:SetData(list, function(index, item)
|
||||
local itemData = list[index]
|
||||
this:FriendListRefreshData(item, itemData)
|
||||
-- if isPlayAnim then
|
||||
-- item.gameObject:SetActive(false)
|
||||
-- else
|
||||
-- item.gameObject:SetActive(true)
|
||||
-- end
|
||||
end)
|
||||
if isPlayAnim then
|
||||
SecTorPlayAnimByScroll(this.ScrollView1)
|
||||
isPlayAnim = false
|
||||
end
|
||||
end,false,this.isPlayAnim)
|
||||
this.friendNumberText:GetComponent("Text").text = Language[10809] .. #list .. "/" .. GoodFriendManager.goodFriendLimit
|
||||
this.haveGetRewardNumText.text=Language[10810]..(GoodFriendManager.MaxEnergy-GoodFriendManager.MaxEnergyGet).."/"..GoodFriendManager.MaxEnergy
|
||||
end
|
||||
|
@ -408,20 +391,10 @@ function GoodFriendMainPanel:FriendApplicationDataShow()
|
|||
else
|
||||
this.friendApplicationRedPoint:SetActive(false)
|
||||
end
|
||||
|
||||
this.ScrollView2:SetData(list, function(index, item)
|
||||
local itemData = list[index]
|
||||
this:FriendApplicationRefreshData(item, itemData)
|
||||
-- if isPlayAnim then
|
||||
-- item.gameObject:SetActive(false)
|
||||
-- else
|
||||
-- item.gameObject:SetActive(true)
|
||||
-- end
|
||||
end)
|
||||
if isPlayAnim then
|
||||
SecTorPlayAnimByScroll(this.ScrollView2)
|
||||
isPlayAnim = false
|
||||
end
|
||||
end,false,this.isPlayAnim)
|
||||
end
|
||||
|
||||
--好友搜索循环滚动数据
|
||||
|
@ -452,16 +425,7 @@ function GoodFriendMainPanel:FriendSearchDataShow()
|
|||
this.ScrollView3:SetData(list, function(index, item)
|
||||
local itemData = list[index]
|
||||
this:FriendSearchRefreshData(item, itemData)
|
||||
-- if isPlayAnim then
|
||||
-- item.gameObject:SetActive(false)
|
||||
-- else
|
||||
-- item.gameObject:SetActive(true)
|
||||
-- end
|
||||
end)
|
||||
if isPlayAnim then
|
||||
SecTorPlayAnimByScroll(this.ScrollView3)
|
||||
isPlayAnim = false
|
||||
end
|
||||
end,false,this.isPlayAnim)
|
||||
end
|
||||
|
||||
--黑名单滚动数据
|
||||
|
@ -492,16 +456,7 @@ function GoodFriendMainPanel:BlackListDataShow()
|
|||
this.ScrollView4:SetData(list, function(index, item)
|
||||
local itemData = list[index]
|
||||
this:BlackListRefreshData(item, itemData)
|
||||
-- if isPlayAnim then
|
||||
-- item.gameObject:SetActive(false)
|
||||
-- else
|
||||
-- item.gameObject:SetActive(true)
|
||||
-- end
|
||||
end)
|
||||
if isPlayAnim then
|
||||
SecTorPlayAnimByScroll(this.ScrollView4)
|
||||
isPlayAnim = false
|
||||
end
|
||||
end,false,this.isPlayAnim)
|
||||
this.blackFriendNum.text= Language[10811] .. #list .. "/" .. GoodFriendManager.blackFriendLimit
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue