上海虹口龙之梦项目
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.
 
 
 
 

57 lines
1.4 KiB

using UniRx;
using UnityEngine;
public class BuildingFeature
{
/// <summary>
///详情
/// <summary>
public string Details{get;set;}
/// <summary>
///图片类型
/// <summary>
public OriginalImageType ImageType{get;set;}
/// <summary>
///图片地址
/// <summary>
public string ImageUrl{get;set;}
}
public class BuildingFeatureReactive:ISetData<BuildingFeature>
{
/// <summary>
///Data
/// <summary>
private BuildingFeature Data{get;set;}= new BuildingFeature();
/// <summary>
///详情
/// <summary>
public ReactiveProperty<string> Details{get;set;}= new ReactiveProperty<string>();
/// <summary>
///图片类型
/// <summary>
public ReactiveProperty<OriginalImageType> ImageType{get;set;}= new ReactiveProperty<OriginalImageType>();
/// <summary>
///图片地址
/// <summary>
public ReactiveProperty<string> ImageUrl{get;set;}= new ReactiveProperty<string>();
public BuildingFeatureReactive()
{
Details.Subscribe(value => Data.Details= value);
ImageType.Subscribe(value => Data.ImageType= value);
ImageUrl.Subscribe(value => Data.ImageUrl= value);
}
public void SetData(BuildingFeature data)
{
Data = data;
Details.Value = data.Details;
ImageType.Value = data.ImageType;
ImageUrl.Value = data.ImageUrl;
}
public BuildingFeature GetData()
{
return Data;
}
}