|
@@ -28,6 +28,7 @@ namespace GFGGame
|
|
private const string NpcPath = "Scene/Npc";
|
|
private const string NpcPath = "Scene/Npc";
|
|
private const string NpcName = "Npc";
|
|
private const string NpcName = "Npc";
|
|
private const string BgResName = "BgRes";
|
|
private const string BgResName = "BgRes";
|
|
|
|
+ private const string Border = "Border";
|
|
|
|
|
|
private List<int> _listData = null;//当前选择的资源数据
|
|
private List<int> _listData = null;//当前选择的资源数据
|
|
private List<GameObject> _itemGameObjs;// = new List<GameObject>();
|
|
private List<GameObject> _itemGameObjs;// = new List<GameObject>();
|
|
@@ -174,12 +175,17 @@ namespace GFGGame
|
|
}
|
|
}
|
|
private void OnListItemClick(EventContext context)
|
|
private void OnListItemClick(EventContext context)
|
|
{
|
|
{
|
|
- if (_itemGameObjs.Count >= MAX_COUNT)
|
|
|
|
|
|
+ EnumPhotographType type = (EnumPhotographType)_ui.m_ComSelectRes.m_comBtnTab.m_c1.selectedIndex;
|
|
|
|
+ if (type == EnumPhotographType.SCENE && _itemGameObjs.Count >= MAX_COUNT)
|
|
{
|
|
{
|
|
PromptController.Instance.ShowFloatTextPrompt("最多穿戴" + MAX_COUNT + "件物品");
|
|
PromptController.Instance.ShowFloatTextPrompt("最多穿戴" + MAX_COUNT + "件物品");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
int itemID = (int)((context.data as GObject).data);
|
|
int itemID = (int)((context.data as GObject).data);
|
|
|
|
+ ChangeItem(itemID);
|
|
|
|
+ }
|
|
|
|
+ private void ChangeItem(int itemID)
|
|
|
|
+ {
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemID);
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemID);
|
|
|
|
|
|
EnumPhotographType type = (EnumPhotographType)_ui.m_ComSelectRes.m_comBtnTab.m_c1.selectedIndex;
|
|
EnumPhotographType type = (EnumPhotographType)_ui.m_ComSelectRes.m_comBtnTab.m_c1.selectedIndex;
|
|
@@ -191,7 +197,6 @@ namespace GFGGame
|
|
break;
|
|
break;
|
|
|
|
|
|
case EnumPhotographType.BORDER:
|
|
case EnumPhotographType.BORDER:
|
|
-
|
|
|
|
PhotographSceneManager.Instance.AddBorderItem(itemCfg);
|
|
PhotographSceneManager.Instance.AddBorderItem(itemCfg);
|
|
break;
|
|
break;
|
|
|
|
|
|
@@ -287,8 +292,10 @@ namespace GFGGame
|
|
hitGameObj = hitGameObj.transform.parent.gameObject;
|
|
hitGameObj = hitGameObj.transform.parent.gameObject;
|
|
|
|
|
|
_ui.m_comSelectBox.target.visible = true;
|
|
_ui.m_comSelectBox.target.visible = true;
|
|
-
|
|
|
|
- PhotographDataManager.Instance.SetLayer(hitGameObj, "top");
|
|
|
|
|
|
+ if (hitGameObj.name != Border)
|
|
|
|
+ {
|
|
|
|
+ PhotographDataManager.Instance.SetLayer(hitGameObj, "top");
|
|
|
|
+ }
|
|
|
|
|
|
if (!_equipDistance.ContainsKey(hitGameObj))
|
|
if (!_equipDistance.ContainsKey(hitGameObj))
|
|
{
|
|
{
|
|
@@ -486,6 +493,10 @@ namespace GFGGame
|
|
{
|
|
{
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ else if (memoryHitGameObj.transform.name == Border)
|
|
|
|
+ {
|
|
|
|
+ ChangeItem(ConstItemID.BORDERID);
|
|
|
|
+ }
|
|
else if (memoryHitGameObj.transform.name == NpcName)
|
|
else if (memoryHitGameObj.transform.name == NpcName)
|
|
{
|
|
{
|
|
SpriteRenderer spriteRenderer = memoryHitGameObj.transform.GetChild(0).GetComponent<SpriteRenderer>();
|
|
SpriteRenderer spriteRenderer = memoryHitGameObj.transform.GetChild(0).GetComponent<SpriteRenderer>();
|
|
@@ -508,6 +519,13 @@ namespace GFGGame
|
|
_ui.m_comSelectBox.target.visible = false;
|
|
_ui.m_comSelectBox.target.visible = false;
|
|
hitGameObj = null;
|
|
hitGameObj = null;
|
|
memoryHitGameObj = null;
|
|
memoryHitGameObj = null;
|
|
|
|
+ _ui.m_ComSelectRes.m_comBtnTab.target.scrollPane.SetPercX(0, false);
|
|
|
|
+ _ui.m_ComSelectRes.m_comBtnTab.m_c1.selectedIndex = 0;
|
|
|
|
+ if (_ui.m_ComSelectRes.m_list.numItems > 0)
|
|
|
|
+ {
|
|
|
|
+ _ui.m_ComSelectRes.m_list.ScrollToView(0);
|
|
|
|
+ _ui.m_ComSelectRes.m_list.selectedIndex = 0;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
private void OnClickBtnUp()
|
|
private void OnClickBtnUp()
|