| | |
| | | if (soConfig.hitEffectId != 0)
|
| | | {
|
| | | SFXController _controller = SFXPlayUtility.Instance.PlayEffectAsync(soConfig.hitEffectId,
|
| | | target.MP_Hit.position,
|
| | | Vector3.forward);
|
| | | target.MP_Hit.position,
|
| | | Vector3.forward);
|
| | | _controller.transform.rotation = CameraController.Instance.CameraObject.transform.rotation * Quaternion.Euler(0, 0, Random.Range(0, 360));
|
| | |
|
| | | // 播放受击音效
|
| | |
| | |
|
| | | if (_actor != null)
|
| | | {
|
| | | _actor.InitNpcConfig((int)npcID);
|
| | | _actor.Init(serverInstID, m_ClientId.Request(), group, null);
|
| | |
|
| | | BuildManagerRelation(_actor, _actorClassType);
|
| | |
| | | |
| | | protected override void OnMainModelLoaded() |
| | | { |
| | | base.OnMainModelLoaded(); |
| | | |
| | | if (NpcConfig.NPCID == 1002) |
| | | { |
| | | m_Obstacle = SoMap.CreateImpasse.General(Pos, Root.eulerAngles, new Vector3(3, 10, 1)); |
| | |
| | |
|
| | | protected override void OnInit(GameNetPackBasic package)
|
| | | {
|
| | | base.OnInit(package);
|
| | |
|
| | | m_H0408 = package as H0408_tagPlayerSummonNPCAppear;
|
| | |
|
| | | if (m_H0408 == null)
|
| | |
| | | ActorInfo.serverBornPos = new UnityEngine.Vector2(m_H0408.PosX, m_H0408.PosY);
|
| | | AdjustPos(m_H0408.PosX, m_H0408.PosY);
|
| | |
|
| | | base.OnInit(package);
|
| | |
|
| | | GActor _parent = GAMgr.Instance.GetBySID(m_H0408.PlayerID);
|
| | | if (_parent != null)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public virtual void InitNpcConfig(int npcID)
|
| | | {
|
| | | if (NpcConfig != null && NpcConfig.NPCID == npcID)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (npcID > 0)
|
| | | {
|
| | | NpcConfig = Config.Instance.Get<NPCConfig>(npcID);
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnInit(GameNetPackBasic package)
|
| | | {
|
| | | base.OnInit(package);
|
| | |
| | | {
|
| | | _npcID = (int)(package as H0435_tagPetAppear).NPCID;
|
| | | }
|
| | | else
|
| | | else if (this is GA_NpcFightNorm)
|
| | | {
|
| | | _npcID = (int)(package as H0406_tagNPCAppear).NPCID;
|
| | | }
|
| | |
|
| | | if (_npcID == 0)
|
| | | {
|
| | | Debug.LogError("加载异常....");
|
| | | return;
|
| | | }
|
| | |
|
| | | NpcConfig = Config.Instance.Get<NPCConfig>(_npcID);
|
| | | InitNpcConfig(_npcID);
|
| | |
|
| | | if (NpcConfig == null)
|
| | | {
|
| | |
| | |
|
| | | if (GUILayout.Button("酷酷酷"))
|
| | | {
|
| | | PlayerDatas.Instance.hero.Polymorph(!PlayerDatas.Instance.hero.IsPolyMorph, 0);
|
| | | var boss = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightBoss>(60203001, E_ActorGroup.Enemy);
|
| | | boss.Pos = PlayerDatas.Instance.hero.Pos;
|
| | | }
|
| | |
|
| | | if (GUILayout.Button("直接重连"))
|