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

77 lines
2.0 KiB

using UniRx;
using UnityEngine;
public class FireEscape
{
/// <summary>
///ID
/// <summary>
public string Id{get;set;}
/// <summary>
///位置
/// <summary>
public string Location{get;set;}
/// <summary>
///宽度
/// <summary>
public string Width{get;set;}
/// <summary>
///图片地址
/// <summary>
public string ImageUrl{get;set;}
/// <summary>
///图片类型
/// <summary>
public OriginalImageType ImageType{get;set;}
}
public class FireEscapeReactive:ISetData<FireEscape>
{
/// <summary>
///Data
/// <summary>
private FireEscape Data{get;set;}= new FireEscape();
/// <summary>
///ID
/// <summary>
public ReactiveProperty<string> Id{get;set;}= new ReactiveProperty<string>();
/// <summary>
///位置
/// <summary>
public ReactiveProperty<string> Location{get;set;}= new ReactiveProperty<string>();
/// <summary>
///宽度
/// <summary>
public ReactiveProperty<string> Width{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 FireEscapeReactive()
{
Id.Subscribe(value => Data.Id= value);
Location.Subscribe(value => Data.Location= value);
Width.Subscribe(value => Data.Width= value);
ImageUrl.Subscribe(value => Data.ImageUrl= value);
ImageType.Subscribe(value => Data.ImageType= value);
}
public void SetData(FireEscape data)
{
Data = data;
Id.Value = data.Id;
Location.Value = data.Location;
Width.Value = data.Width;
ImageUrl.Value = data.ImageUrl;
ImageType.Value = data.ImageType;
}
public FireEscape GetData()
{
return Data;
}
}