From 58812093652bd6c224414f307db0b9ad37366299 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期二, 26 三月 2019 18:07:08 +0800
Subject: [PATCH] 382 客户端采集功能

---
 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