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