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
67 lines
1.6 KiB
using UniRx; |
|
using UnityEngine; |
|
|
|
public class FireElevator |
|
{ |
|
/// <summary> |
|
///ID |
|
/// <summary> |
|
public string Id{get;set;} |
|
/// <summary> |
|
///编号 |
|
/// <summary> |
|
public string Number{get;set;} |
|
/// <summary> |
|
///载重 |
|
/// <summary> |
|
public string Load{get;set;} |
|
/// <summary> |
|
///通往层数 |
|
/// <summary> |
|
public string Layer{get;set;} |
|
} |
|
public class FireElevatorReactive:ISetData<FireElevator> |
|
{ |
|
/// <summary> |
|
///Data |
|
/// <summary> |
|
private FireElevator Data{get;set;}= new FireElevator(); |
|
/// <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> Load{get;set;}= new ReactiveProperty<string>(); |
|
/// <summary> |
|
///通往层数 |
|
/// <summary> |
|
public ReactiveProperty<string> Layer{get;set;}= new ReactiveProperty<string>(); |
|
|
|
public FireElevatorReactive() |
|
{ |
|
Id.Subscribe(value => Data.Id= value); |
|
Number.Subscribe(value => Data.Number= value); |
|
Load.Subscribe(value => Data.Load= value); |
|
Layer.Subscribe(value => Data.Layer= value); |
|
} |
|
|
|
public void SetData(FireElevator data) |
|
{ |
|
Data = data; |
|
Id.Value = data.Id; |
|
Number.Value = data.Number; |
|
Load.Value = data.Load; |
|
Layer.Value = data.Layer; |
|
} |
|
|
|
public FireElevator GetData() |
|
{ |
|
return Data; |
|
} |
|
}
|
|
|