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.
87 lines
2.3 KiB
87 lines
2.3 KiB
using UniRx; |
|
using UnityEngine; |
|
|
|
public class EquipmentRoom |
|
{ |
|
/// <summary> |
|
///ID |
|
/// <summary> |
|
public string Id{get;set;} |
|
/// <summary> |
|
///名称 |
|
/// <summary> |
|
public string Name{get;set;} |
|
/// <summary> |
|
///位置 |
|
/// <summary> |
|
public string Location{get;set;} |
|
/// <summary> |
|
///详情 |
|
/// <summary> |
|
public string Details{get;set;} |
|
/// <summary> |
|
///图片地址 |
|
/// <summary> |
|
public string ImageUrl{get;set;} |
|
/// <summary> |
|
///图片类型 |
|
/// <summary> |
|
public OriginalImageType ImageType{get;set;} |
|
} |
|
public class EquipmentRoomReactive:ISetData<EquipmentRoom> |
|
{ |
|
/// <summary> |
|
///Data |
|
/// <summary> |
|
private EquipmentRoom Data{get;set;}= new EquipmentRoom(); |
|
/// <summary> |
|
///ID |
|
/// <summary> |
|
public ReactiveProperty<string> Id{get;set;}= new ReactiveProperty<string>(); |
|
/// <summary> |
|
///名称 |
|
/// <summary> |
|
public ReactiveProperty<string> Name{get;set;}= new ReactiveProperty<string>(); |
|
/// <summary> |
|
///位置 |
|
/// <summary> |
|
public ReactiveProperty<string> Location{get;set;}= new ReactiveProperty<string>(); |
|
/// <summary> |
|
///详情 |
|
/// <summary> |
|
public ReactiveProperty<string> Details{get;set;}= new ReactiveProperty<string>(); |
|
/// <summary> |
|
///图片地址 |
|
/// <summary> |
|
public ReactiveProperty<string> ImageUrl{get;set;}= new ReactiveProperty<string>(); |
|
/// <summary> |
|
///图片类型 |
|
/// <summary> |
|
public ReactiveProperty<OriginalImageType> ImageType{get;set;}= new ReactiveProperty<OriginalImageType>(); |
|
|
|
public EquipmentRoomReactive() |
|
{ |
|
Id.Subscribe(value => Data.Id= value); |
|
Name.Subscribe(value => Data.Name= value); |
|
Location.Subscribe(value => Data.Location= value); |
|
Details.Subscribe(value => Data.Details= value); |
|
ImageUrl.Subscribe(value => Data.ImageUrl= value); |
|
ImageType.Subscribe(value => Data.ImageType= value); |
|
} |
|
|
|
public void SetData(EquipmentRoom data) |
|
{ |
|
Data = data; |
|
Id.Value = data.Id; |
|
Name.Value = data.Name; |
|
Location.Value = data.Location; |
|
Details.Value = data.Details; |
|
ImageUrl.Value = data.ImageUrl; |
|
ImageType.Value = data.ImageType; |
|
} |
|
|
|
public EquipmentRoom GetData() |
|
{ |
|
return Data; |
|
} |
|
}
|
|
|