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.
97 lines
2.4 KiB
97 lines
2.4 KiB
using UniRx; |
|
using UnityEngine; |
|
|
|
public class FirePump |
|
{ |
|
/// <summary> |
|
///ID |
|
/// <summary> |
|
public string Id{get;set;} |
|
/// <summary> |
|
///类型 |
|
/// <summary> |
|
public string Type{get;set;} |
|
/// <summary> |
|
///型号 |
|
/// <summary> |
|
public string Mode{get;set;} |
|
/// <summary> |
|
///功率 |
|
/// <summary> |
|
public string Power{get;set;} |
|
/// <summary> |
|
///扬程 |
|
/// <summary> |
|
public string Lift{get;set;} |
|
/// <summary> |
|
///流量 |
|
/// <summary> |
|
public string Flow{get;set;} |
|
/// <summary> |
|
///压力 |
|
/// <summary> |
|
public string Pressure{get;set;} |
|
} |
|
public class FirePumpReactive:ISetData<FirePump> |
|
{ |
|
/// <summary> |
|
///Data |
|
/// <summary> |
|
private FirePump Data{get;set;}= new FirePump(); |
|
/// <summary> |
|
///ID |
|
/// <summary> |
|
public ReactiveProperty<string> Id{get;set;}= new ReactiveProperty<string>(); |
|
/// <summary> |
|
///类型 |
|
/// <summary> |
|
public ReactiveProperty<string> Type{get;set;}= new ReactiveProperty<string>(); |
|
/// <summary> |
|
///型号 |
|
/// <summary> |
|
public ReactiveProperty<string> Mode{get;set;}= new ReactiveProperty<string>(); |
|
/// <summary> |
|
///功率 |
|
/// <summary> |
|
public ReactiveProperty<string> Power{get;set;}= new ReactiveProperty<string>(); |
|
/// <summary> |
|
///扬程 |
|
/// <summary> |
|
public ReactiveProperty<string> Lift{get;set;}= new ReactiveProperty<string>(); |
|
/// <summary> |
|
///流量 |
|
/// <summary> |
|
public ReactiveProperty<string> Flow{get;set;}= new ReactiveProperty<string>(); |
|
/// <summary> |
|
///压力 |
|
/// <summary> |
|
public ReactiveProperty<string> Pressure{get;set;}= new ReactiveProperty<string>(); |
|
|
|
public FirePumpReactive() |
|
{ |
|
Id.Subscribe(value => Data.Id= value); |
|
Type.Subscribe(value => Data.Type= value); |
|
Mode.Subscribe(value => Data.Mode= value); |
|
Power.Subscribe(value => Data.Power= value); |
|
Lift.Subscribe(value => Data.Lift= value); |
|
Flow.Subscribe(value => Data.Flow= value); |
|
Pressure.Subscribe(value => Data.Pressure= value); |
|
} |
|
|
|
public void SetData(FirePump data) |
|
{ |
|
Data = data; |
|
Id.Value = data.Id; |
|
Type.Value = data.Type; |
|
Mode.Value = data.Mode; |
|
Power.Value = data.Power; |
|
Lift.Value = data.Lift; |
|
Flow.Value = data.Flow; |
|
Pressure.Value = data.Pressure; |
|
} |
|
|
|
public FirePump GetData() |
|
{ |
|
return Data; |
|
} |
|
}
|
|
|