|
|
|
@ -269,6 +269,17 @@ public class DisasterLoad : MonoBehaviour
|
|
|
|
|
clonesync.gameObjType = cloneGameObjInfo.gameObjType; |
|
|
|
|
clonesync.UserID = cloneGameObjInfo.UserID; |
|
|
|
|
NetworkManager.Default.SendAsync("CLONE_SINGLE_DISASTER_SYNC", clonesync); |
|
|
|
|
|
|
|
|
|
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转 |
|
|
|
|
if (obj.GetComponent<OBJ_ROTATE_SYNC>()) |
|
|
|
|
{ |
|
|
|
|
var arg = new ObjRotateSyncData(); |
|
|
|
|
arg.SendUserID = CurrentUserInfo.mySelf.Id; |
|
|
|
|
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID; |
|
|
|
|
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0); |
|
|
|
|
arg.space = Space.World; |
|
|
|
|
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
obj.GetComponent<SmokeCtrl>().smokeAttribute = SmokeDisaster.smokeAttribute; |
|
|
|
@ -328,6 +339,17 @@ public class DisasterLoad : MonoBehaviour
|
|
|
|
|
clonesync.gameObjType = cloneGameObjInfo.gameObjType; |
|
|
|
|
clonesync.UserID = cloneGameObjInfo.UserID; |
|
|
|
|
NetworkManager.Default.SendAsync("CLONE_SINGLE_DISASTER_SYNC", clonesync); |
|
|
|
|
|
|
|
|
|
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转 |
|
|
|
|
if (obj.GetComponent<OBJ_ROTATE_SYNC>()) |
|
|
|
|
{ |
|
|
|
|
var arg = new ObjRotateSyncData(); |
|
|
|
|
arg.SendUserID = CurrentUserInfo.mySelf.Id; |
|
|
|
|
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID; |
|
|
|
|
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0); |
|
|
|
|
arg.space = Space.World; |
|
|
|
|
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -496,6 +518,17 @@ public class DisasterLoad : MonoBehaviour
|
|
|
|
|
NetworkManager.Default.SendAsync("SET_LIQUIP_HIDE_SYNC", obj.GetComponent<BaseGameObjInfo>().gameObjID); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转 |
|
|
|
|
if (obj.GetComponent<OBJ_ROTATE_SYNC>()) |
|
|
|
|
{ |
|
|
|
|
var argrotate = new ObjRotateSyncData(); |
|
|
|
|
argrotate.SendUserID = CurrentUserInfo.mySelf.Id; |
|
|
|
|
argrotate.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID; |
|
|
|
|
argrotate.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0); |
|
|
|
|
argrotate.space = Space.World; |
|
|
|
|
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -545,6 +578,17 @@ public class DisasterLoad : MonoBehaviour
|
|
|
|
|
clonesync.UserID = cloneGameObjInfo.UserID; |
|
|
|
|
clonesync.HitObjID = Leak1Disaster.OilTankId; |
|
|
|
|
NetworkManager.Default.SendAsync("CLONE_SINGLE_DISASTER_SYNC", clonesync); |
|
|
|
|
|
|
|
|
|
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转 |
|
|
|
|
if (obj.GetComponent<OBJ_ROTATE_SYNC>()) |
|
|
|
|
{ |
|
|
|
|
var arg = new ObjRotateSyncData(); |
|
|
|
|
arg.SendUserID = CurrentUserInfo.mySelf.Id; |
|
|
|
|
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID; |
|
|
|
|
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0); |
|
|
|
|
arg.space = Space.World; |
|
|
|
|
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -603,6 +647,17 @@ public class DisasterLoad : MonoBehaviour
|
|
|
|
|
arg.gameObjID = cloneGameObjInfo.gameObjID; |
|
|
|
|
arg.Level = Leak2Disaster.level; |
|
|
|
|
NetworkManager.Default.SendAsync("SET_LEAK2_SYNC", clonesync); |
|
|
|
|
|
|
|
|
|
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转 |
|
|
|
|
if (obj.GetComponent<OBJ_ROTATE_SYNC>()) |
|
|
|
|
{ |
|
|
|
|
var argrotate = new ObjRotateSyncData(); |
|
|
|
|
argrotate.SendUserID = CurrentUserInfo.mySelf.Id; |
|
|
|
|
argrotate.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID; |
|
|
|
|
argrotate.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0); |
|
|
|
|
argrotate.space = Space.World; |
|
|
|
|
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -650,6 +705,17 @@ public class DisasterLoad : MonoBehaviour
|
|
|
|
|
clonesync.gameObjType = cloneGameObjInfo.gameObjType; |
|
|
|
|
clonesync.UserID = cloneGameObjInfo.UserID; |
|
|
|
|
NetworkManager.Default.SendAsync("CLONE_SINGLE_DISASTER_SYNC", clonesync); |
|
|
|
|
|
|
|
|
|
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转 |
|
|
|
|
if (obj.GetComponent<OBJ_ROTATE_SYNC>()) |
|
|
|
|
{ |
|
|
|
|
var arg = new ObjRotateSyncData(); |
|
|
|
|
arg.SendUserID = CurrentUserInfo.mySelf.Id; |
|
|
|
|
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID; |
|
|
|
|
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0); |
|
|
|
|
arg.space = Space.World; |
|
|
|
|
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -696,6 +762,17 @@ public class DisasterLoad : MonoBehaviour
|
|
|
|
|
clonesync.gameObjType = cloneGameObjInfo.gameObjType; |
|
|
|
|
clonesync.UserID = cloneGameObjInfo.UserID; |
|
|
|
|
NetworkManager.Default.SendAsync("CLONE_SINGLE_DISASTER_SYNC", clonesync); |
|
|
|
|
|
|
|
|
|
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转 |
|
|
|
|
if (obj.GetComponent<OBJ_ROTATE_SYNC>()) |
|
|
|
|
{ |
|
|
|
|
var arg = new ObjRotateSyncData(); |
|
|
|
|
arg.SendUserID = CurrentUserInfo.mySelf.Id; |
|
|
|
|
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID; |
|
|
|
|
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0); |
|
|
|
|
arg.space = Space.World; |
|
|
|
|
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -742,6 +819,17 @@ public class DisasterLoad : MonoBehaviour
|
|
|
|
|
clonesync.gameObjType = cloneGameObjInfo.gameObjType; |
|
|
|
|
clonesync.UserID = cloneGameObjInfo.UserID; |
|
|
|
|
NetworkManager.Default.SendAsync("CLONE_SINGLE_DISASTER_SYNC", clonesync); |
|
|
|
|
|
|
|
|
|
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转 |
|
|
|
|
if (obj.GetComponent<OBJ_ROTATE_SYNC>()) |
|
|
|
|
{ |
|
|
|
|
var arg = new ObjRotateSyncData(); |
|
|
|
|
arg.SendUserID = CurrentUserInfo.mySelf.Id; |
|
|
|
|
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID; |
|
|
|
|
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0); |
|
|
|
|
arg.space = Space.World; |
|
|
|
|
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -788,6 +876,16 @@ public class DisasterLoad : MonoBehaviour
|
|
|
|
|
clonesync.gameObjType = cloneGameObjInfo.gameObjType; |
|
|
|
|
clonesync.UserID = cloneGameObjInfo.UserID; |
|
|
|
|
NetworkManager.Default.SendAsync("CLONE_SINGLE_DISASTER_SYNC", clonesync); |
|
|
|
|
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转 |
|
|
|
|
if (obj.GetComponent<OBJ_ROTATE_SYNC>()) |
|
|
|
|
{ |
|
|
|
|
var arg = new ObjRotateSyncData(); |
|
|
|
|
arg.SendUserID = CurrentUserInfo.mySelf.Id; |
|
|
|
|
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID; |
|
|
|
|
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0); |
|
|
|
|
arg.space = Space.World; |
|
|
|
|
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -866,6 +964,18 @@ public class DisasterLoad : MonoBehaviour
|
|
|
|
|
|
|
|
|
|
data.SendUserID = CurrentUserInfo.mySelf.Id; |
|
|
|
|
NetworkManager.Default.SendAsync("FORCIBLE_SCALE_SYNC", data); |
|
|
|
|
|
|
|
|
|
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转 |
|
|
|
|
if(obj.GetComponent<OBJ_ROTATE_SYNC>()) |
|
|
|
|
{ |
|
|
|
|
var arg = new ObjRotateSyncData(); |
|
|
|
|
arg.SendUserID = CurrentUserInfo.mySelf.Id; |
|
|
|
|
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID; |
|
|
|
|
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0); |
|
|
|
|
arg.space = Space.World; |
|
|
|
|
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|