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.
50 lines
1.5 KiB
50 lines
1.5 KiB
using System; |
|
using System.Collections; |
|
using System.Collections.Generic; |
|
using AX.Network.Protocols; |
|
using UnityEngine; |
|
using AX.Serialization; |
|
using AX.MessageSystem; |
|
|
|
/// <summary> |
|
/// 全液面火同步 |
|
/// </summary> |
|
public class SET_FIRE_LIQUID_SYNC : NetworkMessageBehaviour |
|
{ |
|
//private Transform LG1; |
|
//private Transform LG2; |
|
|
|
//void Start() |
|
//{ |
|
// LG1 = transform.Find("GroundFire_LG1"); |
|
// LG2 = transform.Find("GroundFire_LG2"); |
|
//} |
|
protected override void Execute(BinaryMessage message) |
|
{ |
|
|
|
InputHistory.Instance.RegisterInputHistory(message); |
|
|
|
var info = message.Body.Deserialize<FireLiquidScaleSyncData>(); |
|
// var sender = info.SendUserID; |
|
if (InputManager.Instance) |
|
{ |
|
if (CurrentUserInfo.mySelf.Id != info.SendUserID) |
|
{ |
|
if (GetComponent<BaseGameObjInfo>().gameObjID==info.gameObjID) |
|
{ |
|
GetComponent<FireLiquidLevelCtrl>().FireScale = info.firescale; |
|
GetComponent<FireLiquidLevelCtrl>().TargetNormalID = info.oilTankID; |
|
MessageDispatcher.SendMessage("SET_SMOKE_DIRECTION"); |
|
GetComponent<FireFightNormal>().setRate(); |
|
|
|
|
|
//if (GameSettings.othersSettings.mode != Mode.DisasterManagement |
|
// && GameSettings.othersSettings.isSelectedDisaster) |
|
//{ |
|
// gameObject.SetActive(false); |
|
//} |
|
} |
|
} |
|
} |
|
} |
|
}
|
|
|