少年修仙传客户端代码仓库
client_linchunjie
2019-03-26 291ccee6cdf1812f8b3b1f7b0e52c1ebd70cfe4c
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()