|
@@ -2,6 +2,7 @@ using UnityEngine;
|
|
using FairyGUI;
|
|
using FairyGUI;
|
|
using UI.Friend;
|
|
using UI.Friend;
|
|
using UI.CommonGame;
|
|
using UI.CommonGame;
|
|
|
|
+using System.Collections;
|
|
|
|
|
|
namespace GFGGame
|
|
namespace GFGGame
|
|
{
|
|
{
|
|
@@ -73,7 +74,7 @@ namespace GFGGame
|
|
{
|
|
{
|
|
CustomSuitData customSuit = CustomSuitDataManager.GetSuitList(CustomSuitDataManager.currentIndex);
|
|
CustomSuitData customSuit = CustomSuitDataManager.GetSuitList(CustomSuitDataManager.currentIndex);
|
|
_sceneObject = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetPrefabPath("SceneFriend"));
|
|
_sceneObject = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetPrefabPath("SceneFriend"));
|
|
- _dressUpObj.setSceneObj(_sceneObject);
|
|
|
|
|
|
+ _dressUpObj.setSceneObj(_sceneObject, false,true,null,true, DressUpAction);
|
|
_dressUpObj.AddOrRemove(customSuit.dressUpData.bgId, true);
|
|
_dressUpObj.AddOrRemove(customSuit.dressUpData.bgId, true);
|
|
}
|
|
}
|
|
FriendDataManager.Instance.UpdateFriendList(true);
|
|
FriendDataManager.Instance.UpdateFriendList(true);
|
|
@@ -89,19 +90,19 @@ namespace GFGGame
|
|
{
|
|
{
|
|
_ui.m_list.selectedIndex = i;
|
|
_ui.m_list.selectedIndex = i;
|
|
_ui.m_list.ScrollToView(i);
|
|
_ui.m_list.ScrollToView(i);
|
|
- ReqFriendDetialInfo(i);
|
|
|
|
|
|
+ ReqFriendDetailInfo(i);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
_ui.m_list.selectedIndex = 0;
|
|
_ui.m_list.selectedIndex = 0;
|
|
- ReqFriendDetialInfo(0);
|
|
|
|
|
|
+ ReqFriendDetailInfo(0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- ReqFriendDetialInfo(-1);
|
|
|
|
|
|
+ ReqFriendDetailInfo(-1);
|
|
}
|
|
}
|
|
|
|
|
|
RefreshView();
|
|
RefreshView();
|
|
@@ -185,7 +186,7 @@ namespace GFGGame
|
|
{
|
|
{
|
|
GObject item = context.data as GObject;
|
|
GObject item = context.data as GObject;
|
|
int index = (int)item.data;
|
|
int index = (int)item.data;
|
|
- ReqFriendDetialInfo(index);
|
|
|
|
|
|
+ ReqFriendDetailInfo(index);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -235,7 +236,7 @@ namespace GFGGame
|
|
{
|
|
{
|
|
index = -1;//无好友
|
|
index = -1;//无好友
|
|
}
|
|
}
|
|
- ReqFriendDetialInfo(index);
|
|
|
|
|
|
+ ReqFriendDetailInfo(index);
|
|
_ui.m_txtCount.text = string.Format("好友数:{0}/{1}", _ui.m_list.numItems, GlobalCfgArray.globalCfg.maxFriendCount);
|
|
_ui.m_txtCount.text = string.Format("好友数:{0}/{1}", _ui.m_list.numItems, GlobalCfgArray.globalCfg.maxFriendCount);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -245,6 +246,7 @@ namespace GFGGame
|
|
int selectedIndex = 0;
|
|
int selectedIndex = 0;
|
|
if (_ui.m_list.numItems > 0)
|
|
if (_ui.m_list.numItems > 0)
|
|
{
|
|
{
|
|
|
|
+ _ui.m_list.ScrollToView(_ui.m_list.selectedIndex);
|
|
int childIndex = _ui.m_list.ItemIndexToChildIndex(_ui.m_list.selectedIndex);
|
|
int childIndex = _ui.m_list.ItemIndexToChildIndex(_ui.m_list.selectedIndex);
|
|
if (childIndex < 0) return;
|
|
if (childIndex < 0) return;
|
|
GButton item = _ui.m_list.GetChildAt(childIndex).asButton.GetChild("btnSend").asButton;
|
|
GButton item = _ui.m_list.GetChildAt(childIndex).asButton.GetChild("btnSend").asButton;
|
|
@@ -253,12 +255,12 @@ namespace GFGGame
|
|
}
|
|
}
|
|
_ui.m_list.numItems = FriendDataManager.Instance.FriendDatas.Count;
|
|
_ui.m_list.numItems = FriendDataManager.Instance.FriendDatas.Count;
|
|
_ui.m_list.selectedIndex = selectedIndex;
|
|
_ui.m_list.selectedIndex = selectedIndex;
|
|
- ReqFriendDetialInfo(selectedIndex);
|
|
|
|
|
|
+ ReqFriendDetailInfo(selectedIndex);
|
|
|
|
|
|
_ui.m_txtCount.text = string.Format("好友数:{0}/{1}", _ui.m_list.numItems, GlobalCfgArray.globalCfg.maxFriendCount);
|
|
_ui.m_txtCount.text = string.Format("好友数:{0}/{1}", _ui.m_list.numItems, GlobalCfgArray.globalCfg.maxFriendCount);
|
|
}
|
|
}
|
|
|
|
|
|
- private async void ReqFriendDetialInfo(int index)
|
|
|
|
|
|
+ private async void ReqFriendDetailInfo(int index)
|
|
{
|
|
{
|
|
if (index >= 0)
|
|
if (index >= 0)
|
|
{
|
|
{
|
|
@@ -278,6 +280,9 @@ namespace GFGGame
|
|
}
|
|
}
|
|
private void UpdateScene(CustomSuitData suitSavedData)
|
|
private void UpdateScene(CustomSuitData suitSavedData)
|
|
{
|
|
{
|
|
|
|
+ Transform transform = _sceneObject.transform.Find("Role");
|
|
|
|
+ transform.localScale = Vector3.zero;
|
|
|
|
+
|
|
if (suitSavedData != null)
|
|
if (suitSavedData != null)
|
|
{
|
|
{
|
|
_dressUpObj.PutOnDressUpData(suitSavedData.dressUpData);
|
|
_dressUpObj.PutOnDressUpData(suitSavedData.dressUpData);
|
|
@@ -286,11 +291,16 @@ namespace GFGGame
|
|
{
|
|
{
|
|
_dressUpObj.PutOnDefaultDressUpData();
|
|
_dressUpObj.PutOnDefaultDressUpData();
|
|
}
|
|
}
|
|
|
|
+ //transform.localPosition = new Vector3(-2, transform.localPosition.y, 0);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private void DressUpAction()
|
|
|
|
+ {
|
|
Transform transform = _sceneObject.transform.Find("Role");
|
|
Transform transform = _sceneObject.transform.Find("Role");
|
|
transform.localPosition = new Vector3(-2, transform.localPosition.y, 0);
|
|
transform.localPosition = new Vector3(-2, transform.localPosition.y, 0);
|
|
|
|
+ transform.localScale = Vector3.one;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
private void OnBtnInfoClick()
|
|
private void OnBtnInfoClick()
|
|
{
|
|
{
|
|
if (_friendRoleId == 0)
|
|
if (_friendRoleId == 0)
|