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

67 lines
1.6 KiB

using UniRx;
using UnityEngine;
public class EscapeStair
{
/// <summary>
///ID
/// <summary>
public string Id{get;set;}
/// <summary>
///编号
/// <summary>
public string Number{get;set;}
/// <summary>
///宽度
/// <summary>
public string Width{get;set;}
/// <summary>
///通往层数
/// <summary>
public string Layer{get;set;}
}
public class EscapeStairReactive:ISetData<EscapeStair>
{
/// <summary>
///Data
/// <summary>
private EscapeStair Data{get;set;}= new EscapeStair();
/// <summary>
///ID
/// <summary>
public ReactiveProperty<string> Id{get;set;}= new ReactiveProperty<string>();
/// <summary>
///编号
/// <summary>
public ReactiveProperty<string> Number{get;set;}= new ReactiveProperty<string>();
/// <summary>
///宽度
/// <summary>
public ReactiveProperty<string> Width{get;set;}= new ReactiveProperty<string>();
/// <summary>
///通往层数
/// <summary>
public ReactiveProperty<string> Layer{get;set;}= new ReactiveProperty<string>();
public EscapeStairReactive()
{
Id.Subscribe(value => Data.Id= value);
Number.Subscribe(value => Data.Number= value);
Width.Subscribe(value => Data.Width= value);
Layer.Subscribe(value => Data.Layer= value);
}
public void SetData(EscapeStair data)
{
Data = data;
Id.Value = data.Id;
Number.Value = data.Number;
Width.Value = data.Width;
Layer.Value = data.Layer;
}
public EscapeStair GetData()
{
return Data;
}
}