You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.0 KiB
32 lines
1.0 KiB
using System; |
|
using System.Collections; |
|
using System.Collections.Generic; |
|
using AX.Network.Protocols; |
|
using UnityEngine; |
|
using AX.Serialization; |
|
|
|
public class ABJUST_ROTATION_SYNC : NetworkMessageBehaviour |
|
{ |
|
protected override void Execute(BinaryMessage message) |
|
{ |
|
InputHistory.Instance.RegisterInputHistory(message); |
|
|
|
//var sender = message.ID; |
|
var info = message.Body.Deserialize<AdjustRotationWhileEndPathfindData>(); |
|
if (InputManager.Instance) |
|
{ |
|
if (CurrentUserInfo.mySelf.Id != info.SenderId) |
|
{ |
|
if (info.GameObjId == GetComponent<BaseGameObjInfo>().gameObjID) |
|
{ |
|
if (GetComponent<CloneGameObjInfo>().gameObjType==CloneObjType.trappedPerson) |
|
{ |
|
transform.position = info.Hitpoint; |
|
|
|
} |
|
transform.rotation = Quaternion.Euler(info.EndRotation.x,info.EndRotation.y,info.EndRotation.z); |
|
} |
|
} |
|
} |
|
} |
|
}
|
|
|