网演高层钦州
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.
 
 
 

31 lines
1.1 KiB

using AX.Network.Protocols;
using AX.Serialization;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MOVEWATERCANNON_ROTATE_SYNC : NetworkMessageBehaviour
{
public Transform Vratate;
public Transform Hratate;
protected override void Execute(BinaryMessage message)
{
InputHistory.Instance.RegisterInputHistory(message);
var info = message.Body.Deserialize<SprayRotateSyncData>();
if (InputManager.Instance)
{
if (CurrentUserInfo.mySelf.Id != info.SendUserID)
{
if (info.gameObjID == GetComponent<BaseGameObjInfo>().gameObjID)
{
Vratate.transform.localRotation = Quaternion.Euler(info.Vroatet,
Vratate.transform.localRotation.eulerAngles.y, Vratate.transform.localRotation.eulerAngles.z);
Hratate.transform.localRotation = Quaternion.Euler(Hratate.transform.localRotation.eulerAngles.x,
info.Hrotate, Hratate.transform.localRotation.eulerAngles.z);
}
}
}
}
}