|
@@ -24,7 +24,8 @@ namespace GFGGame
|
|
// private const string BorderResPath = "Border/BorderRes";
|
|
// private const string BorderResPath = "Border/BorderRes";
|
|
// private const string NpcResPath = "Scene/Npc/NpcRes";
|
|
// private const string NpcResPath = "Scene/Npc/NpcRes";
|
|
private const string RolePath = "Scene/Role";
|
|
private const string RolePath = "Scene/Role";
|
|
- private const string BodyResName = "BodyRes";
|
|
|
|
|
|
+ private const string BodyResName = "Body";
|
|
|
|
+ private const string BodyResName1 = "Body_a";
|
|
// 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";
|
|
@@ -230,11 +231,9 @@ namespace GFGGame
|
|
|
|
|
|
private void AddSceneItem(ItemCfg itemCfg, bool setLayer)
|
|
private void AddSceneItem(ItemCfg itemCfg, bool setLayer)
|
|
{
|
|
{
|
|
- bool isOnlyEff = true;
|
|
|
|
Vector3 pos = Vector3.zero;
|
|
Vector3 pos = Vector3.zero;
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer3))
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer3))
|
|
{
|
|
{
|
|
- isOnlyEff = false;
|
|
|
|
GameObject parentGameObj3 = new GameObject(string.Format("{0}_{1}", itemCfg.id, 3));
|
|
GameObject parentGameObj3 = new GameObject(string.Format("{0}_{1}", itemCfg.id, 3));
|
|
PhotographSceneManager.Instance.AddSceneItem(parentGameObj3, itemCfg, 3, setLayer);
|
|
PhotographSceneManager.Instance.AddSceneItem(parentGameObj3, itemCfg, 3, setLayer);
|
|
if (setLayer)
|
|
if (setLayer)
|
|
@@ -245,7 +244,6 @@ namespace GFGGame
|
|
}
|
|
}
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer2))
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer2))
|
|
{
|
|
{
|
|
- isOnlyEff = false;
|
|
|
|
GameObject parentGameObj2 = new GameObject(string.Format("{0}_{1}", itemCfg.id, 2));
|
|
GameObject parentGameObj2 = new GameObject(string.Format("{0}_{1}", itemCfg.id, 2));
|
|
PhotographSceneManager.Instance.AddSceneItem(parentGameObj2, itemCfg, 2, setLayer);
|
|
PhotographSceneManager.Instance.AddSceneItem(parentGameObj2, itemCfg, 2, setLayer);
|
|
if (setLayer)
|
|
if (setLayer)
|
|
@@ -256,7 +254,7 @@ namespace GFGGame
|
|
}
|
|
}
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer1))
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer1))
|
|
{
|
|
{
|
|
- isOnlyEff = false;
|
|
|
|
|
|
+
|
|
GameObject parentGameObj1 = new GameObject(string.Format("{0}_{1}", itemCfg.id, 1));
|
|
GameObject parentGameObj1 = new GameObject(string.Format("{0}_{1}", itemCfg.id, 1));
|
|
PhotographSceneManager.Instance.AddSceneItem(parentGameObj1, itemCfg, 1, setLayer);
|
|
PhotographSceneManager.Instance.AddSceneItem(parentGameObj1, itemCfg, 1, setLayer);
|
|
|
|
|
|
@@ -266,19 +264,8 @@ namespace GFGGame
|
|
pos = parentGameObj1.transform.localPosition;
|
|
pos = parentGameObj1.transform.localPosition;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- if (isOnlyEff && itemCfg.effLayer > 0)
|
|
|
|
- {
|
|
|
|
- GameObject parentGameObj1 = new GameObject(string.Format("{0}_{1}", itemCfg.id, "eff"));
|
|
|
|
- PhotographSceneManager.Instance.AddSceneItem(parentGameObj1, itemCfg, 0, setLayer, true);
|
|
|
|
-
|
|
|
|
- if (setLayer)
|
|
|
|
- {
|
|
|
|
- parentGameObj1.transform.localPosition = pos == Vector3.zero ? -parentGameObj1.transform.GetChild(0).localPosition : pos;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
/************************************************************场景*********************************************************/
|
|
/************************************************************场景*********************************************************/
|
|
|
|
|
|
private void OnTouchUIBegin(EventContext context)
|
|
private void OnTouchUIBegin(EventContext context)
|
|
@@ -297,7 +284,7 @@ namespace GFGGame
|
|
hitGameObj = PhotographUtil.Instance.GetFirstHitObj(hit2Ds);
|
|
hitGameObj = PhotographUtil.Instance.GetFirstHitObj(hit2Ds);
|
|
|
|
|
|
_ui.m_comSelectBox.m_btnDelete.visible = true;
|
|
_ui.m_comSelectBox.m_btnDelete.visible = true;
|
|
- if (hitGameObj.name == BodyResName)//主角不可删除
|
|
|
|
|
|
+ if (hitGameObj.name == BodyResName || hitGameObj.name == BodyResName1)//主角不可删除
|
|
{
|
|
{
|
|
_ui.m_comSelectBox.m_btnDelete.visible = false;
|
|
_ui.m_comSelectBox.m_btnDelete.visible = false;
|
|
}
|
|
}
|