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