using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class MessageData { public string msgType { get; set; } public List listModelData { get; set; } public ModelData CreateModel { get; set; } public string DesModelId { get; set; } public MessageData(string msgType, List listModelData,ModelData createmodel,string desModelId) { this.msgType = msgType; this.listModelData = listModelData; this.CreateModel = createmodel; this.DesModelId = desModelId; } } public class TransformData { public SerializableVector3 pos { get; set; } public SerializableVector3 eul { get; set; } public SerializableVector3 scale { get; set; } public TransformData(SerializableVector3 pos , SerializableVector3 eul, SerializableVector3 scale) { this.pos = pos; this.eul = eul; this.scale = scale; } } public class ModelData { public string id { get; set; } public string name { get; set; } public TransformData transformData { get; set; } public bool isShowBox { get; set; } public bool isSnatch { get; set; } public bool isPlayer { get; set; } public ModelData( string id , string name ,TransformData transfromData, bool isShowBox,bool isSnatch,bool isPlayer) { this.id = id; this.name = name; this.transformData = transfromData; this.isShowBox = isShowBox; this.isSnatch = isSnatch; this.isPlayer = isPlayer; } } [System.Serializable] public struct SerializableVector3 { public float x; public float y; public float z; public SerializableVector3(float rX, float rY, float rZ) { x = rX; y = rY; z = rZ; } public override string ToString() { return String.Format("[{0}, {1}, {2}]", x, y, z); } public static implicit operator Vector3(SerializableVector3 rValue) { return new Vector3(rValue.x, rValue.y, rValue.z); } public static implicit operator SerializableVector3(Vector3 rValue) { return new SerializableVector3(rValue.x, rValue.y, rValue.z); } } //public class Hand //{ // public TransformData transformData { get; set; } //}