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.
37 lines
1.6 KiB
37 lines
1.6 KiB
using System; |
|
using System.Collections; |
|
using System.Collections.Generic; |
|
using AX.Network.Protocols; |
|
using UnityEngine; |
|
using AX.Serialization; |
|
|
|
public class CLONE_SNOWCANNON_SYNC : NetworkMessageBehaviour |
|
{ |
|
protected override void Execute(BinaryMessage message) |
|
{ |
|
InputHistory.Instance.RegisterInputHistory(message); |
|
|
|
var info = message.Body.Deserialize<CloneDisasterSyncData>(); |
|
// var sender = info.SendUserID; |
|
if (InputManager.Instance) |
|
{ |
|
//移动水泡 |
|
if (CurrentUserInfo.mySelf.Id != info.SendUserID) |
|
{ |
|
if (info.gameObjType == GetComponent<CloneSonwCannon>().cloneObjType) |
|
{ |
|
GameObject Prefab = GetComponent<CloneSonwCannon>().clonePrefab;//Resources.Load<GameObject>(info.PrefabsPath); |
|
//Transform parent = EntitiesManager.Instance.GetEntityByID((long)info.parentUID).transform; |
|
GameObject clone = EntitiesManager.Instance.CreateObj(Prefab, info.ClonePosition, transform, info.gameObjID); |
|
clone.GetComponent<BaseGameObjInfo>().UserID = info.UserID; |
|
clone.GetComponent<BaseGameObjInfo>().gameObjType = info.gameObjType; |
|
clone.GetComponent<CloneGameObjInfo>().floorNum = info.floorNum; |
|
clone.GetComponent<CloneGameObjInfo>().buildNum = info.buildNum; |
|
clone.GetComponent<CloneGameObjInfo>().interlayerNum = info.interlayerNum; |
|
clone.name = info.name; |
|
} |
|
} |
|
} |
|
} |
|
|
|
} |