From efa5f8d07fc3321f6ac5f5d97fb422db28d0886f Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 05 三月 2019 10:55:31 +0800
Subject: [PATCH] Merge branch 'master' into Equip
---
Core/NetworkPackage/DTCFile/ServerPack/H08_Event/DTC0820_tagMissionDict.cs | 3
Fight/GameActor/GA_NpcClientFightNorm.cs | 3
System/Skill/TalentModel.cs | 2
Core/MapEditor/Editor/MapEditor.cs | 8
Fight/Stage/MapEditor/Game/TriggerHandler.cs.meta | 12 +
Utility/RuntimeLogUtility.cs | 19 +
System/Skill/TreasureSkillWin.cs | 10 +
Fight/Actor/HeroBehaviour.cs | 9
Fight/Stage/MapEditor/Game/IEventHandler.cs | 11 +
Fight/Stage/MapEditor/Game/IEventHandler.cs.meta | 12 +
Core/SFX/SFXPlayUtility.cs | 1
Fight/Stage/Dungeon/DungeonStage.cs | 75 -------
Fight/Stage/MapEditor/Game/ClientSceneManager.cs.meta | 12 +
Fight/Stage/MapEditor/Game/EventRefreshNPCHandler.cs.meta | 12 +
Fight/Stage/MapEditor/Game/TriggerHandler.cs | 12 +
Core/MapEditor/Behavior/Bhv_Evt.cs | 2
Core/MapEditor/Behavior/Bhv_MonsterData.cs | 3
Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs | 26 ++
System/MainInterfacePanel/LowSettingTip.cs | 22 ++
Fight/Stage/MapEditor/Game/ClientSceneManager.cs | 159 +++++++++++++++
Fight/Stage/MapEditor/Game/EventRefreshNPCHandler.cs | 137 +++++++++++++
Core/MapEditor/Data/MapTrigger.cs | 2
22 files changed, 467 insertions(+), 85 deletions(-)
diff --git a/Core/MapEditor/Behavior/Bhv_Evt.cs b/Core/MapEditor/Behavior/Bhv_Evt.cs
index aeed249..d9c1f27 100644
--- a/Core/MapEditor/Behavior/Bhv_Evt.cs
+++ b/Core/MapEditor/Behavior/Bhv_Evt.cs
@@ -43,9 +43,7 @@
public virtual void Export(BinaryWriter bw)
{
bw.Write((byte)type);
- Debug.LogFormat("type: {0}", type);
bw.Write(id);
- Debug.LogFormat("id: {0}", id);
}
#endif
}
diff --git a/Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs b/Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs
index 0eee7dd..4a573e3 100644
--- a/Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs
+++ b/Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs
@@ -71,7 +71,23 @@
int _count = br.ReadInt32();
for (int i = 0; i < _count; ++i)
{
- var _go = new GameObject();
+ var _resName = br.ReadString();
+ GameObject _go = null;
+
+ if (!string.IsNullOrEmpty(_resName.Trim()))
+ {
+ string _path = "Assets/ResourcesOut/Mob/Prefab_Race_" + _resName + ".prefab";
+ _go = AssetDatabase.LoadAssetAtPath<GameObject>(_path);
+ if (_go)
+ {
+ _go = Instantiate(_go);
+ }
+ }
+ else
+ {
+ _go = GameObject.CreatePrimitive(PrimitiveType.Capsule);
+ }
+
_go.transform.SetParent(transform);
_go.transform.localPosition = Vector3.zero;
_go.transform.eulerAngles = Vector3.zero;
@@ -171,10 +187,10 @@
for (int i = monsterList.Count - 1; i >= 0; --i)
{
EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
- EditorGUILayout.LabelField("NPCID", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(50));
- EditorGUILayout.LabelField(monsterList[i].npcID.ToString(), guiSkin.textField, GUILayout.Height(20));
- EditorGUILayout.LabelField("妯″瀷鍚�", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(50));
- EditorGUILayout.LabelField(monsterList[i].resName, guiSkin.textField, GUILayout.Height(22), GUILayout.Width(70));
+ EditorGUILayout.LabelField("NPCID", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(50));
+ EditorGUILayout.LabelField(monsterList[i].npcID.ToString(), guiSkin.textField, GUILayout.Height(20), GUILayout.Width(70));
+ EditorGUILayout.LabelField("妯″瀷鍚�", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(50));
+ EditorGUILayout.LabelField(monsterList[i].resName, guiSkin.textField, GUILayout.Height(20), GUILayout.Width(70));
if (GUILayout.Button("瀹氶珮", guiSkin.button, GUILayout.Width(60), GUILayout.Height(20)))
{
Vector3 _pos = monsterList[i].transform.position;
diff --git a/Core/MapEditor/Behavior/Bhv_MonsterData.cs b/Core/MapEditor/Behavior/Bhv_MonsterData.cs
index cc61d9a..c83744f 100644
--- a/Core/MapEditor/Behavior/Bhv_MonsterData.cs
+++ b/Core/MapEditor/Behavior/Bhv_MonsterData.cs
@@ -16,8 +16,8 @@
public void Save(BinaryWriter bw)
{
- bw.Write(npcID);
bw.Write(resName);
+ bw.Write(npcID);
bw.Write(ai);
bw.Write((float)System.Math.Round(transform.position.x, 2));
bw.Write((float)System.Math.Round(transform.position.y, 2));
@@ -27,7 +27,6 @@
public void Load(BinaryReader br)
{
npcID = br.ReadInt32();
- resName = br.ReadString();
ai = br.ReadByte();
float _x = br.ReadSingle();
float _y = br.ReadSingle();
diff --git a/Core/MapEditor/Data/MapTrigger.cs b/Core/MapEditor/Data/MapTrigger.cs
index 8c34b43..3e485d8 100644
--- a/Core/MapEditor/Data/MapTrigger.cs
+++ b/Core/MapEditor/Data/MapTrigger.cs
@@ -16,6 +16,7 @@
public Evt.E_EventType type;
public E_TriggerType triggerType;
public int prevID;
+ public int nextID;
public int id;
public int[] evevntIDs;
public Vector3 position;
@@ -28,6 +29,7 @@
triggerType = (E_TriggerType)br.ReadByte();
type = (Evt.E_EventType)br.ReadByte();
prevID = br.ReadInt32();
+ nextID = br.ReadInt32();
float _pX = br.ReadSingle();
float _pY = br.ReadSingle();
float _pZ = br.ReadSingle();
diff --git a/Core/MapEditor/Editor/MapEditor.cs b/Core/MapEditor/Editor/MapEditor.cs
index 8eaf9ef..9d19abb 100644
--- a/Core/MapEditor/Editor/MapEditor.cs
+++ b/Core/MapEditor/Editor/MapEditor.cs
@@ -82,6 +82,14 @@
public override void OnInspectorGUI()
{
+ if (GUILayout.Button("娴嬭瘯"))
+ {
+ var m = MapData.LoadFormFile(10120);
+ if (m == null)
+ {
+ Debug.Log("鍔犺浇澶辫触");
+ }
+ }
if (gUISkin == null)
{
gUISkin = AssetDatabase.LoadAssetAtPath<GUISkin>("Assets/Scripts/Core/MapEditor/Editor/EditorResources/EditorSkin.guiskin");
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/H08_Event/DTC0820_tagMissionDict.cs b/Core/NetworkPackage/DTCFile/ServerPack/H08_Event/DTC0820_tagMissionDict.cs
index 27cf314..af2ccbc 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/H08_Event/DTC0820_tagMissionDict.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/H08_Event/DTC0820_tagMissionDict.cs
@@ -28,7 +28,8 @@
taskmodel.TaskRefreshes((int)vNetData.MissionID, vNetData.DictKeyLen, vNetData.DictKey, (int)vNetData.DictValue);//浠诲姟瀛楀吀
taskmodel.Task0820(vNetData);
taskmodel.GetTaskGetOnNow((int)vNetData.MissionID, vNetData.DictKey);
- PreFightMission.Instance.HandleNewPlayerMission(vNetData);
+ // PreFightMission.Instance.HandleNewPlayerMission(vNetData);
+ ClientSceneManager.Instance.Handle_0820(vNetData);
}
}
diff --git a/Core/SFX/SFXPlayUtility.cs b/Core/SFX/SFXPlayUtility.cs
index f14a07a..a25a552 100644
--- a/Core/SFX/SFXPlayUtility.cs
+++ b/Core/SFX/SFXPlayUtility.cs
@@ -148,6 +148,7 @@
}
EffectConfig _effectModel = EffectConfig.Get(id);
+
if (_effectModel.setParent > 0)
{
_controller.transform.SetParent(parent);
diff --git a/Fight/Actor/HeroBehaviour.cs b/Fight/Actor/HeroBehaviour.cs
index 1d5dbc0..d09fbbf 100644
--- a/Fight/Actor/HeroBehaviour.cs
+++ b/Fight/Actor/HeroBehaviour.cs
@@ -894,6 +894,15 @@
m_Hero.SelectTarget = null;
}
+ var _clientNpc = _target as GA_NpcClientFightNorm;
+ if (_clientNpc.belongEventID != -1)
+ {
+ var _eventHandler = ClientSceneManager.Instance.GetEventHandler(_clientNpc.belongEventID) as EventRefreshNPCHandler;
+ if (_eventHandler != null)
+ {
+ _eventHandler.NpcDead(_clientNpc.NpcConfig.NPCID);
+ }
+ }
// 鍓嶆湡鎴樻枟鍙彂閫佺煶澶翠汉鐨�
//if (1000 == _target.NpcConfig.NPCID)
//{
diff --git a/Fight/GameActor/GA_NpcClientFightNorm.cs b/Fight/GameActor/GA_NpcClientFightNorm.cs
index 49ef039..353a673 100644
--- a/Fight/GameActor/GA_NpcClientFightNorm.cs
+++ b/Fight/GameActor/GA_NpcClientFightNorm.cs
@@ -3,6 +3,7 @@
public class GA_NpcClientFightNorm : GActorNpcFight
{
+ public int belongEventID;
private HeadUpName m_HeadUpName;
private LifeBar m_LifeBar;
@@ -135,6 +136,8 @@
m_Obstacle = null;
}
+ belongEventID = -1;
+
base.OnUnit();
}
diff --git a/Fight/Stage/Dungeon/DungeonStage.cs b/Fight/Stage/Dungeon/DungeonStage.cs
index 01b3bd1..2d72200 100644
--- a/Fight/Stage/Dungeon/DungeonStage.cs
+++ b/Fight/Stage/Dungeon/DungeonStage.cs
@@ -8,9 +8,7 @@
public class DungeonStage : Stage
{
public static Dictionary<MapArea.E_Type, List<MapArea>> s_MapAreaDict;
- private static List<TransferGroup> m_TransferGroupList = new List<TransferGroup>();
public static MapType CurrentMapType;
- private H2Engine.MapData mapData;
public override void Initialize()
{
@@ -31,11 +29,6 @@
SoundPlayer.Instance.PlayBackGroundMusic(mapResConfig.Music);
SceneResourcesReplace();
- foreach (var _t in m_TransferGroupList)
- {
- _t.UnInit();
- }
- m_TransferGroupList.Clear();
// 鍋氫竴浜涘墠鏈熸垬鏂楃殑棰勫姞杞�
// if (!PreFightMission.Instance.IsFinished())
// {
@@ -114,7 +107,7 @@
_hero.SkillMgr.ResetAllCD();
}
- HandleMapData();
+ ClientSceneManager.Instance.Init();
GA_Hero.s_MapSwitching = false;
}
@@ -124,7 +117,6 @@
base.UnInitialize();
StopAllCoroutines();
- mapData = null;
if (s_MapAreaDict != null)
{
@@ -150,7 +142,7 @@
CameraController.Instance.StopZoom();
CameraController.Instance.StopShake();
}
-
+ ClientSceneManager.Instance.UnInit();
GAMgr.Instance.UnInit();
DropItemManager.ReleaseAll();
SFXPlayUtility.Instance.Unitialize();
@@ -168,10 +160,7 @@
DropItemManager.Update();
- foreach (var _trasfer in m_TransferGroupList)
- {
- _trasfer.Update();
- }
+ ClientSceneManager.Instance.Update();
// if (PreFightMission.Instance.IsFinished() == false)
// {
@@ -274,48 +263,7 @@
}
}
- private void HandleMapData()
- {
- mapData = H2Engine.MapData.LoadFormFile(PlayerDatas.Instance.baseData.MapID);
- if (mapData == null)
- {
- return;
- }
- // 鐩墠鐗堟湰鍙鐞嗗埛鍦烘櫙鐗╀欢
- // foreach (var _trigger in mapData.triggers)
- // {
- // if (_trigger.triggerType != H2Engine.MapTrigger.E_TriggerType.EnterStage)
- // {
- // continue;
- // }
- // foreach (var _id in _trigger.evevntIDs)
- // {
- // var _event = mapData.eventDict[_id];
- // if (_event.type == H2Engine.Evt.E_EventType.SceneObject)
- // {
- // var _refreshSceneObject = _event as H2Engine.Evt_RefreshSceneObject;
- // if (_refreshSceneObject != null)
- // {
- // foreach (var _sceneObjData in _refreshSceneObject.sceneObjects)
- // {
- // var _prefab = InstanceResourcesLoader.LoadModelPrefab(InstanceResourcesLoader.raceSuffix, _sceneObjData.resName, false);
- // if (_prefab)
- // {
- // var _go = GameObject.Instantiate(_prefab);
- // _go.transform.position = _sceneObjData.position;
- // _go.transform.eulerAngles = _sceneObjData.eulerAngles;
- // }
- // }
- // }
- // }
- // }
- // }
- foreach (var _trasfer in mapData.transfers)
- {
- m_TransferGroupList.Add(new TransferGroup(_trasfer));
- }
- }
private void HandleAutoFight()
{
@@ -475,23 +423,6 @@
default:
break;
}
- }
-
- public Vector3 GetCloseTransPoint(Vector3 pos)
- {
- // 閬嶅巻鎵惧埌绂荤粰瀹氱偣鏈�杩戝苟涓斿彲瀵昏矾鑷崇殑浼犻�佺偣 P
- // 鎵惧埌 P鐐圭殑 鍙︿竴绔� P1
- // 鍒ゆ柇褰撳墠浼犲叆鐨勭偣鏄惁鍙互瀵昏矾鑷� P1
- // 涓嶈鐨勮瘽閲嶆柊瀵绘壘 鍙互鐨勮瘽杩斿洖 P1 鐨勫潗鏍�
- float _compareDis;
- float _dis;
-
- foreach (var _p in m_TransferGroupList)
- {
-
- }
-
- return Vector3.zero;
}
private void SceneResourceReplace10010()
diff --git a/Fight/Stage/MapEditor/Game/ClientSceneManager.cs b/Fight/Stage/MapEditor/Game/ClientSceneManager.cs
new file mode 100644
index 0000000..cb6b126
--- /dev/null
+++ b/Fight/Stage/MapEditor/Game/ClientSceneManager.cs
@@ -0,0 +1,159 @@
+using H2Engine;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class ClientSceneManager : Singleton<ClientSceneManager>
+{
+ private H2Engine.MapData m_MapData;
+ private List<TransferGroup> m_TransferGroupList = new List<TransferGroup>();
+ private Dictionary<int, IEventHandler> m_EventHandlerDict = new Dictionary<int, IEventHandler>();
+ private List<IEventHandler> m_ReadyRemoveEventHandlerList = new List<IEventHandler>();
+
+ public void Handle_0820(H0820_tagMissionDict package)
+ {
+ if (package.DictKey.Equals("riggerID"))
+ {
+ SnxxzGame.Instance.StartCoroutine(DelayTrigger((int)package.DictValue));
+ }
+ }
+
+ private bool m_Inited = false;
+
+ public void Init()
+ {
+ if (m_Inited)
+ {
+ return;
+ }
+ m_Inited = true;
+
+ int _mapID = PlayerDatas.Instance.baseData.MapID;
+ m_MapData = MapData.LoadFormFile(_mapID);
+ if (m_MapData == null)
+ {
+ return;
+ }
+
+ foreach (var _trasfer in m_MapData.transfers)
+ {
+ m_TransferGroupList.Add(new TransferGroup(_trasfer));
+ }
+
+ }
+
+ public void UnInit()
+ {
+ foreach (var _t in m_TransferGroupList)
+ {
+ _t.UnInit();
+ }
+ m_TransferGroupList.Clear();
+
+ m_Inited = false;
+ }
+
+ public void Update()
+ {
+ foreach (var _trasfer in m_TransferGroupList)
+ {
+ _trasfer.Update();
+ }
+
+ m_ReadyRemoveEventHandlerList.Clear();
+
+ foreach (var _eventHandler in m_EventHandlerDict.Values)
+ {
+ _eventHandler.Update();
+ if (_eventHandler.IsCompelete())
+ {
+ m_ReadyRemoveEventHandlerList.Add(_eventHandler);
+ }
+ }
+
+ foreach (var _eventHandler in m_ReadyRemoveEventHandlerList)
+ {
+ _eventHandler.UnInit();
+ m_EventHandlerDict.Remove(_eventHandler.GetEventID());
+ }
+
+ m_ReadyRemoveEventHandlerList.Clear();
+ }
+
+ public IEventHandler GetEventHandler(int id)
+ {
+ if (m_EventHandlerDict.ContainsKey(id))
+ {
+ return m_EventHandlerDict[id];
+ }
+ return null;
+ }
+
+ public Vector3 GetCloseTransPoint(Vector3 pos)
+ {
+ // 閬嶅巻鎵惧埌绂荤粰瀹氱偣鏈�杩戝苟涓斿彲瀵昏矾鑷崇殑浼犻�佺偣 P
+ // 鎵惧埌 P鐐圭殑 鍙︿竴绔� P1
+ // 鍒ゆ柇褰撳墠浼犲叆鐨勭偣鏄惁鍙互瀵昏矾鑷� P1
+ // 涓嶈鐨勮瘽閲嶆柊瀵绘壘 鍙互鐨勮瘽杩斿洖 P1 鐨勫潗鏍�
+ float _compareDis;
+ float _dis;
+
+ foreach (var _p in m_TransferGroupList)
+ {
+
+ }
+
+ return Vector3.zero;
+ }
+
+ private IEnumerator DelayTrigger(int id)
+ {
+ while (StageLoad.Instance.isLoading)
+ {
+ yield return null;
+ }
+
+ if (m_MapData == null)
+ {
+ Init();
+ }
+
+ if (m_MapData.triggers == null
+ || m_MapData.triggers.Length == 0)
+ {
+ yield break;
+ }
+
+ foreach (var _trigger in m_MapData.triggers)
+ {
+ if (_trigger.id != id)
+ {
+ continue;
+ }
+
+ if (_trigger.evevntIDs == null
+ || _trigger.evevntIDs.Length == 0)
+ {
+ continue;
+ }
+
+ foreach (var _eventID in _trigger.evevntIDs)
+ {
+ if (!m_MapData.eventDict.ContainsKey(_eventID))
+ {
+ continue;
+ }
+
+ var _event = m_MapData.eventDict[_eventID];
+ if (_event.type == Evt.E_EventType.Enemy)
+ {
+ var _refreshEvent = new EventRefreshNPCHandler();
+ _refreshEvent.Init(_event as Evt_RefreshMonster);
+ m_EventHandlerDict.Add(_refreshEvent.GetEventID(), _refreshEvent);
+ }
+ }
+
+ break;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Fight/Stage/MapEditor/Game/ClientSceneManager.cs.meta b/Fight/Stage/MapEditor/Game/ClientSceneManager.cs.meta
new file mode 100644
index 0000000..5adb68e
--- /dev/null
+++ b/Fight/Stage/MapEditor/Game/ClientSceneManager.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b5880d5e8e289c74cab760bb8367869c
+timeCreated: 1551698978
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Fight/Stage/MapEditor/Game/EventRefreshNPCHandler.cs b/Fight/Stage/MapEditor/Game/EventRefreshNPCHandler.cs
new file mode 100644
index 0000000..b055789
--- /dev/null
+++ b/Fight/Stage/MapEditor/Game/EventRefreshNPCHandler.cs
@@ -0,0 +1,137 @@
+using UnityEngine;
+using H2Engine;
+
+public class EventRefreshNPCHandler : IEventHandler
+{
+ private Evt_RefreshMonster m_Evt = null;
+
+ private int m_DeadCount = 0;
+ private float m_Duration = 0;
+ private int m_RefreshCount = -1;
+ private float m_RefreshInterval = 0;
+
+ public int GetEventID()
+ {
+ if (m_Evt != null)
+ {
+ return m_Evt.id;
+ }
+ return -1;
+ }
+
+ public Evt.E_EventType GetEventType()
+ {
+ return Evt.E_EventType.Enemy;
+ }
+
+ public void Init(Evt evt)
+ {
+ m_Evt = evt as Evt_RefreshMonster;
+ m_DeadCount = 0;
+ m_Duration = 0;
+ m_RefreshCount = -1;
+ m_RefreshInterval = 0;
+ }
+
+ public void Update()
+ {
+ if (IsCompelete() && m_Duration > 0)
+ {
+ return;
+ }
+
+ m_Duration += Time.deltaTime;
+
+ // 姝ゆā寮忎笅鍒峰嚭绗竴鍙��
+ if (m_Evt.refreshType == Evt_RefreshMonster.E_RefreshType.OneByOnePrevDie)
+ {
+ if (m_RefreshCount == -1)
+ {
+ RefreshNpc();
+ }
+ }
+ else if (m_Evt.refreshType == Evt_RefreshMonster.E_RefreshType.All)
+ {
+ RefreshAll();
+ }
+ else if (m_Evt.refreshType == Evt_RefreshMonster.E_RefreshType.OneByOneTime)
+ {
+ m_RefreshInterval += Time.deltaTime;
+ if (m_RefreshInterval > m_Evt.refreshParam)
+ {
+ m_RefreshInterval = 0;
+ RefreshNpc();
+ }
+ }
+ }
+
+ public void NpcDead(int npcID)
+ {
+ m_DeadCount += 1;
+ Debug.LogFormat("閫氱煡姝讳骸: {0}, 褰撳墠璁℃暟: {1}", npcID, m_DeadCount);
+ if (m_Evt.refreshType == Evt_RefreshMonster.E_RefreshType.OneByOnePrevDie)
+ {
+ RefreshNpc();
+ }
+
+ CA225_tagCMClientTaskCount _a225 = new CA225_tagCMClientTaskCount
+ {
+ CountID = (uint)npcID
+ };
+ GameNetSystem.Instance.SendInfo(_a225);
+ }
+
+ private void RefreshNpc()
+ {
+ m_RefreshCount += 1;
+ if (m_RefreshCount >= 0 && m_RefreshCount < m_Evt.monsters.Length)
+ {
+ var _data = m_Evt.monsters[m_RefreshCount];
+ var _npc = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightNorm>((uint)_data.npcID, E_ActorGroup.Enemy);
+ _npc.Pos = _data.position;
+ _npc.belongEventID = m_Evt.id;
+ }
+ }
+
+ private void RefreshAll()
+ {
+ if (m_RefreshCount < m_Evt.monsters.Length)
+ {
+ foreach (var _data in m_Evt.monsters)
+ {
+ var _npc = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightNorm>((uint)_data.npcID, E_ActorGroup.Enemy);
+ _npc.Pos = _data.position;
+ _npc.belongEventID = m_Evt.id;
+ }
+ m_RefreshCount = m_Evt.monsters.Length;
+ }
+ }
+
+ public void UnInit()
+ {
+ Debug.LogFormat("浜嬩欢: {0} => UnInit()", m_Evt.id);
+ }
+
+ public bool IsCompelete()
+ {
+ if (m_Evt == null)
+ {
+ return true;
+ }
+
+ if (m_Evt.overCondition == Evt_RefreshMonster.E_OverCondition.DeadCount)
+ {
+ if (m_Evt.conditionParam <= 0)
+ {
+ return m_DeadCount >= m_Evt.monsters.Length;
+ }
+
+ return m_DeadCount >= m_Evt.conditionParam;
+ }
+ else if (m_Evt.overCondition == Evt_RefreshMonster.E_OverCondition.Time)
+ {
+ return m_Duration >= m_Evt.conditionParam && m_DeadCount >= m_Evt.monsters.Length;
+ }
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/Fight/Stage/MapEditor/Game/EventRefreshNPCHandler.cs.meta b/Fight/Stage/MapEditor/Game/EventRefreshNPCHandler.cs.meta
new file mode 100644
index 0000000..27d0f09
--- /dev/null
+++ b/Fight/Stage/MapEditor/Game/EventRefreshNPCHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c7f7e93eba93cd044bdd4b6ddc9aa334
+timeCreated: 1551667471
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Fight/Stage/MapEditor/Game/IEventHandler.cs b/Fight/Stage/MapEditor/Game/IEventHandler.cs
new file mode 100644
index 0000000..6e0f6f2
--- /dev/null
+++ b/Fight/Stage/MapEditor/Game/IEventHandler.cs
@@ -0,0 +1,11 @@
+using H2Engine;
+
+public interface IEventHandler
+{
+ int GetEventID();
+ Evt.E_EventType GetEventType();
+ void Init(Evt evt);
+ bool IsCompelete();
+ void Update();
+ void UnInit();
+}
\ No newline at end of file
diff --git a/Fight/Stage/MapEditor/Game/IEventHandler.cs.meta b/Fight/Stage/MapEditor/Game/IEventHandler.cs.meta
new file mode 100644
index 0000000..44052e2
--- /dev/null
+++ b/Fight/Stage/MapEditor/Game/IEventHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8831940d4fa557e42825777dcd3ca1b7
+timeCreated: 1551684662
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Fight/Stage/MapEditor/Game/TriggerHandler.cs b/Fight/Stage/MapEditor/Game/TriggerHandler.cs
new file mode 100644
index 0000000..57f6ca8
--- /dev/null
+++ b/Fight/Stage/MapEditor/Game/TriggerHandler.cs
@@ -0,0 +1,12 @@
+using H2Engine;
+using UnityEngine;
+
+public class TriggerHandler
+{
+ private MapTrigger m_Trigger;
+
+ public TriggerHandler(MapTrigger trigger)
+ {
+ m_Trigger = trigger;
+ }
+}
\ No newline at end of file
diff --git a/Fight/Stage/MapEditor/Game/TriggerHandler.cs.meta b/Fight/Stage/MapEditor/Game/TriggerHandler.cs.meta
new file mode 100644
index 0000000..c330fb2
--- /dev/null
+++ b/Fight/Stage/MapEditor/Game/TriggerHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d4b520a4d7e5d434a8cbbfa2f21eaadc
+timeCreated: 1551678527
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/MainInterfacePanel/LowSettingTip.cs b/System/MainInterfacePanel/LowSettingTip.cs
index e041dc6..67cbeab 100644
--- a/System/MainInterfacePanel/LowSettingTip.cs
+++ b/System/MainInterfacePanel/LowSettingTip.cs
@@ -79,8 +79,26 @@
void SkillButton()
{
WindowCenter.Instance.Close<MainInterfaceWin>();
- WindowCenter.Instance.Open<SkillWin>();
-
+
+ var skillModel = ModelCenter.Instance.GetModel<SkillModel>();
+ var treasureSkillModel = ModelCenter.Instance.GetModel<TreasureSkillModel>();
+ var talentModel = ModelCenter.Instance.GetModel<TalentModel>();
+ if (skillModel.passSkillRedpoint.state == RedPointState.Simple)
+ {
+ WindowCenter.Instance.Open<SkillWin>(false, 1);
+ }
+ else if (treasureSkillModel.redpoint.state == RedPointState.Simple)
+ {
+ WindowCenter.Instance.Open<SkillWin>(false, 2);
+ }
+ else if (talentModel.talentRedpoint.state == RedPointState.Simple)
+ {
+ WindowCenter.Instance.Open<SkillWin>(false, 3);
+ }
+ else
+ {
+ WindowCenter.Instance.Open<SkillWin>();
+ }
//DesignDebug.Log("鎶�鑳芥寜閽�");
}
diff --git a/System/Skill/TalentModel.cs b/System/Skill/TalentModel.cs
index e1af9c3..76ea2bf 100644
--- a/System/Skill/TalentModel.cs
+++ b/System/Skill/TalentModel.cs
@@ -420,7 +420,7 @@
#endregion
#region 绾㈢偣
- Redpoint talentRedpoint = new Redpoint(103, 10303);
+ public Redpoint talentRedpoint = new Redpoint(103, 10303);
void UpdateRedpoint()
{
talentRedpoint.state = RedPointState.None;
diff --git a/System/Skill/TreasureSkillWin.cs b/System/Skill/TreasureSkillWin.cs
index 7cf1c7f..607d15b 100644
--- a/System/Skill/TreasureSkillWin.cs
+++ b/System/Skill/TreasureSkillWin.cs
@@ -61,6 +61,16 @@
Display();
+ List<int> list;
+ if (model.TryGetSkills(out list))
+ {
+ var index = list.IndexOf(model.selectSkill);
+ if (index != -1)
+ {
+ m_Controller.JumpIndex(index);
+ }
+ }
+
model.treasureSkillRefresh += TreasureSkillRefresh;
model.selectRefresh += SelectRefresh;
model.skillLevelUpRefresh += SkillLevelUpRefresh;
diff --git a/Utility/RuntimeLogUtility.cs b/Utility/RuntimeLogUtility.cs
index 31bcceb..dbb203f 100644
--- a/Utility/RuntimeLogUtility.cs
+++ b/Utility/RuntimeLogUtility.cs
@@ -188,9 +188,27 @@
private Vector2 _start;
private Vector2 _end;
+ private int _triggerID;
+
public override void OnInspectorGUI()
{
GUILayout.Space(5);
+
+ EditorGUILayout.BeginHorizontal();
+ _triggerID = EditorGUILayout.IntField("瑙﹀彂鍣↖D", _triggerID);
+ if (GUILayout.Button("瑙﹀彂瀹㈡埛绔Е鍙戝櫒"))
+ {
+ }
+ EditorGUILayout.EndHorizontal();
+
+ if (GUILayout.Button("娓呯┖浠诲姟"))
+ {
+ CA225_tagCMClientTaskCount _a225 = new CA225_tagCMClientTaskCount
+ {
+ CountID = 10000
+ };
+ GameNetSystem.Instance.SendInfo(_a225);
+ }
EditorGUILayout.LabelField("Log瀛樺偍璺緞", RuntimeLogUtility.s_LogPath);
@@ -216,6 +234,7 @@
RuntimeLogUtility.TEST_CLIENT_PVP = EditorGUILayout.Toggle("妯℃嫙瀹㈡埛绔疨VP鐘舵��", RuntimeLogUtility.TEST_CLIENT_PVP);
RuntimeLogUtility.TEST_CLIENT_PVP_AI = EditorGUILayout.Toggle("妯℃嫙瀹㈡埛绔疨VP鐨凙I鐘舵��", RuntimeLogUtility.TEST_CLIENT_PVP_AI);
+
if (GUILayout.Button("鍒涘缓PVP鏁屾柟"))
{
GActorPlayerBase.PlayerInfo _playerInfo = new GActorPlayerBase.PlayerInfo();
--
Gitblit v1.8.0