From 241c9ca8ad6954ccedd19e0051e78e3f94e5de0a Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期五, 24 五月 2019 17:12:42 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/HazyRegion/HazyMapNpcScriptableObject.cs | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/System/HazyRegion/HazyMapNpcScriptableObject.cs b/System/HazyRegion/HazyMapNpcScriptableObject.cs
index 2d1c1f4..1eeace4 100644
--- a/System/HazyRegion/HazyMapNpcScriptableObject.cs
+++ b/System/HazyRegion/HazyMapNpcScriptableObject.cs
@@ -7,10 +7,21 @@
#endif
public class HazyMapNpcScriptableObject : ScriptableObject
{
+ [SerializeField, Header("璁㈠埗娆℃暟")] int[] m_CustomCounts;
+ [SerializeField, Header("璁㈠埗浣嶇疆")] List<CustomPositions> m_CustomNpcPositions;
[SerializeField] List<Vector3> m_NpcPositions;
- public List<Vector3> GetNpcPositions()
+ public List<Vector3> GetNpcPositions(int count)
{
+ if (m_CustomCounts != null && m_CustomCounts.Length > 0
+ && m_CustomNpcPositions != null)
+ {
+ var index = Array.IndexOf(m_CustomCounts, count);
+ if (index != -1 && index < m_CustomNpcPositions.Count)
+ {
+ return m_CustomNpcPositions[index].positions;
+ }
+ }
return m_NpcPositions;
}
@@ -23,6 +34,13 @@
}
}
#endif
+
+
+ [Serializable]
+ public struct CustomPositions
+ {
+ public List<Vector3> positions;
+ }
}
#if UNITY_EDITOR
--
Gitblit v1.8.0