| | |
| | |
|
| | | Vector3 _destPosition = new Vector3((vNetData.DestPosX - GA_Hero.MapOffset.x) * .5f, _actor.Pos.y, (vNetData.DestPosY - GA_Hero.MapOffset.z) * .5f);
|
| | |
|
| | |
|
| | | if (_actor is GA_Pet)
|
| | | {
|
| | | if (MathUtility.DistanceSqrtXZ(_destPosition, _actor.Pos) < 2f)
|
| | | //float _distance = MathUtility.DistanceSqrtXZ(_destPosition, _actor.Pos);
|
| | | //Debug.LogFormat("收到宠物移动包: {0} 当前坐标: {1}, 将要移动到: {2}, 当前距离: {3}", vNetData.ObjID, new Vector2((int)(_actor.Pos.x * 2), (int)(_actor.Pos.z * 2)),
|
| | | // new Vector2(vNetData.DestPosX, vNetData.DestPosY), _distance);
|
| | | if (MathUtility.DistanceSqrtXZ(_destPosition, _actor.Pos) < 0.2f)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | { |
| | | base.OnUpdate(owner, animator, stateInfo, layerIndex); |
| | | |
| | | if (owner is GA_Pet) |
| | | { |
| | | if (animator.IsInTransition(0) |
| | | && (animator.GetNextAnimatorStateInfo(0).shortNameHash == GAStaticDefine.State_IdleHash |
| | | || animator.GetNextAnimatorStateInfo(0).shortNameHash == GAStaticDefine.State_RunHash)) |
| | | { |
| | | return; |
| | | } |
| | | } |
| | | |
| | | if (owner.State != E_ActorState.AutoRun) |
| | | { |
| | | if (owner.destForward != Vector3.zero) |
| | |
| | | public Dictionary<int, string> s_NpcID2BundleName = new Dictionary<int, string>();
|
| | | public Dictionary<int, string> s_NpcID2Assetname = new Dictionary<int, string>();
|
| | |
|
| | |
|
| | |
|
| | | public event UnityAction<uint> OnGActorRequest;
|
| | | public event UnityAction<uint> OnGActorServerDie;
|
| | |
|