fix:代码提交
This commit is contained in:
159
Assets/Scripts/App/GameDto.cs
Normal file
159
Assets/Scripts/App/GameDto.cs
Normal file
@@ -0,0 +1,159 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
//界面
|
||||
public enum PageType
|
||||
{
|
||||
Null,
|
||||
//镜头
|
||||
Camera1, //镜头-1
|
||||
Camera2, //镜头-2
|
||||
|
||||
//页面
|
||||
PnlMain, //主界面
|
||||
PnlPage1, //界面-1
|
||||
PnlPage2, //界面-2
|
||||
|
||||
//Icon
|
||||
Icon01,
|
||||
Icon02,
|
||||
Icon03,
|
||||
Icon04,
|
||||
Icon05,
|
||||
|
||||
//Effect
|
||||
Area01,
|
||||
Area02,
|
||||
|
||||
//Dialog
|
||||
DlgInfo01,
|
||||
DlgInfo02,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#region 网络数据
|
||||
// 状态信息
|
||||
[System.Serializable]
|
||||
public class Status
|
||||
{
|
||||
public int code;
|
||||
public string msg;
|
||||
}
|
||||
// 设备列表返回数据
|
||||
[System.Serializable]
|
||||
public class JsonData
|
||||
{
|
||||
public Status status;
|
||||
public Result result;
|
||||
}
|
||||
// 设备详情返回数据
|
||||
[System.Serializable]
|
||||
public class JsonDetails
|
||||
{
|
||||
public Status status;
|
||||
public ResultDetails result;
|
||||
}
|
||||
|
||||
// 设备列表结果
|
||||
[System.Serializable]
|
||||
public class Result
|
||||
{
|
||||
public List<Device> device_list;
|
||||
}
|
||||
|
||||
// 设备详情结果
|
||||
[System.Serializable]
|
||||
public class ResultDetails
|
||||
{
|
||||
public int device_id;
|
||||
public string device_sn;
|
||||
public string device_name;
|
||||
public string online_status;
|
||||
public string pic;
|
||||
public string status;
|
||||
public string address;
|
||||
public string location;
|
||||
public DataPoints data_points;
|
||||
}
|
||||
|
||||
|
||||
// 设备信息
|
||||
[System.Serializable]
|
||||
public class Device
|
||||
{
|
||||
public int device_id;
|
||||
public string device_sn;
|
||||
public string device_name;
|
||||
public string online_status;
|
||||
public int project_id;
|
||||
public string pic;
|
||||
}
|
||||
|
||||
// 数据点信息
|
||||
[System.Serializable]
|
||||
public class Timeseries
|
||||
{
|
||||
public string point_id;
|
||||
public string name;
|
||||
public string alias;
|
||||
public string identifier;
|
||||
public string unitName;
|
||||
public string unitIdentifier;
|
||||
public string accessMode;
|
||||
public string dataType;
|
||||
public List<object> propertyEnum;
|
||||
public string value;
|
||||
public string callback_time;
|
||||
}
|
||||
|
||||
// 数据点信息
|
||||
[System.Serializable]
|
||||
public class DataPoints
|
||||
{
|
||||
public List<object> control;
|
||||
public List<Timeseries> timeseries;
|
||||
}
|
||||
|
||||
//传值web。把模型名称传过去
|
||||
[System.Serializable]
|
||||
public class DataToSend
|
||||
{
|
||||
public ResultDetails dataItem;
|
||||
public string iconName;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class IconData
|
||||
{
|
||||
public string device_sn;
|
||||
public string iconName;
|
||||
public string identifier;
|
||||
public Transform iconTransform;
|
||||
|
||||
public string cameraName;
|
||||
public Transform cameraTransform;
|
||||
|
||||
public IconData(string device_sn, string iconName, string identifier, Transform iconTransform,string cameraName,Transform cameraTransform)
|
||||
{
|
||||
this.device_sn = device_sn;
|
||||
this.iconName = iconName;
|
||||
this.identifier = identifier;
|
||||
this.iconTransform = iconTransform;
|
||||
this.cameraName = cameraName;
|
||||
this.cameraTransform = cameraTransform;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user