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.4 KiB
87 lines
2.4 KiB
using UniRx; |
|
using UnityEngine; |
|
|
|
public class BuildingAdjacent |
|
{ |
|
/// <summary> |
|
///ID |
|
/// <summary> |
|
public string Id{get;set;} |
|
/// <summary> |
|
///图片地址 |
|
/// <summary> |
|
public string ImageUrl{get;set;} |
|
/// <summary> |
|
///图片类型 |
|
/// <summary> |
|
public OriginalImageType ImageType{get;set;} |
|
/// <summary> |
|
///道路 |
|
/// <summary> |
|
public string Street{get;set;} |
|
/// <summary> |
|
///建筑 |
|
/// <summary> |
|
public string Building{get;set;} |
|
/// <summary> |
|
///距离 |
|
/// <summary> |
|
public string Distance{get;set;} |
|
} |
|
public class BuildingAdjacentReactive:ISetData<BuildingAdjacent> |
|
{ |
|
/// <summary> |
|
///Data |
|
/// <summary> |
|
private BuildingAdjacent Data{get;set;}= new BuildingAdjacent(); |
|
/// <summary> |
|
///ID |
|
/// <summary> |
|
public ReactiveProperty<string> Id{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>(); |
|
/// <summary> |
|
///道路 |
|
/// <summary> |
|
public ReactiveProperty<string> Street{get;set;}= new ReactiveProperty<string>(); |
|
/// <summary> |
|
///建筑 |
|
/// <summary> |
|
public ReactiveProperty<string> Building{get;set;}= new ReactiveProperty<string>(); |
|
/// <summary> |
|
///距离 |
|
/// <summary> |
|
public ReactiveProperty<string> Distance{get;set;}= new ReactiveProperty<string>(); |
|
|
|
public BuildingAdjacentReactive() |
|
{ |
|
Id.Subscribe(value => Data.Id= value); |
|
ImageUrl.Subscribe(value => Data.ImageUrl= value); |
|
ImageType.Subscribe(value => Data.ImageType= value); |
|
Street.Subscribe(value => Data.Street= value); |
|
Building.Subscribe(value => Data.Building= value); |
|
Distance.Subscribe(value => Data.Distance= value); |
|
} |
|
|
|
public void SetData(BuildingAdjacent data) |
|
{ |
|
Data = data; |
|
Id.Value = data.Id; |
|
ImageUrl.Value = data.ImageUrl; |
|
ImageType.Value = data.ImageType; |
|
Street.Value = data.Street; |
|
Building.Value = data.Building; |
|
Distance.Value = data.Distance; |
|
} |
|
|
|
public BuildingAdjacent GetData() |
|
{ |
|
return Data; |
|
} |
|
}
|
|
|