From 291ccee6cdf1812f8b3b1f7b0e52c1ebd70cfe4c Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 26 三月 2019 20:03:44 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 Fight/GameActor/GA_NpcClientFunc.cs |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/Fight/GameActor/GA_NpcClientFunc.cs b/Fight/GameActor/GA_NpcClientFunc.cs
index 37b09f1..c413075 100644
--- a/Fight/GameActor/GA_NpcClientFunc.cs
+++ b/Fight/GameActor/GA_NpcClientFunc.cs
@@ -22,11 +22,29 @@
             Rotation = Quaternion.Euler(0, UnityEngine.Random.Range(0, 360), 0);
         }
 
+        ActorType = GameObjType.gotNPC;
+        Root.gameObject.layer = LayerUtility.Monster;
+
         if (CanBeSelected())
         {
+            CapsuleCollider _collider = Root.AddMissingComponent<CapsuleCollider>();
+            _collider.center = new Vector3(0, NpcConfig.ModleHeight * .5f, 0);
+            _collider.radius = NpcConfig.ModelRadius;
+            _collider.height = NpcConfig.ModleHeight;
+
             m_NPCInteractProcessor = Root.AddMissingComponent<NPCInteractProcessor>();
             m_NPCInteractProcessor.npcIntergactEvent += OnClick;
         }
+
+        RequestShadow();
+
+        if (NpcConfig.NPCEffect != 0)
+        {
+            m_AppearEffect = SFXPlayUtility.Instance.PlayBattleEffect(NpcConfig.NPCEffect, this);
+        }
+
+        // 寮�濮嬪紓姝ュ姞杞借〃鐜板眰
+        InstanceResourcesLoader.AsyncLoadNpc(NpcConfig.NPCID, OnPrefabLoadFinished);
     }
 
     protected override void OnUnit()

--
Gitblit v1.8.0