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
933 B
31 lines
933 B
5 years ago
|
using System;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using AX.Network.Protocols;
|
||
|
using UnityEngine;
|
||
|
using AX.Serialization;
|
||
|
using AX.MessageSystem;
|
||
|
|
||
|
public class WIND_ZONE_SYNC : NetworkMessageBehaviour
|
||
|
{
|
||
|
protected override void Execute(BinaryMessage message)
|
||
|
{
|
||
|
InputHistory.Instance.RegisterInputHistory(message);
|
||
|
|
||
|
var info = message.Body.Deserialize<WindZoneSyncData>();
|
||
|
// var sender = info.SendUserID;
|
||
|
if (InputManager.Instance)
|
||
|
{
|
||
|
if (CurrentUserInfo.mySelf.Id != info.SendUserID)
|
||
|
{
|
||
|
if (info.gameObjID == GetComponent<BaseGameObjInfo>().gameObjID)
|
||
|
{
|
||
|
transform.rotation = info.Rotation;
|
||
|
GetComponent<WindZone>().windMain = info.windMain;
|
||
|
MessageDispatcher.SendMessage("SET_SMOKE_DIRECTION");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|