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

79 lines
2.2 KiB

using UniRx;
using UnityEngine;
public class OutdoorHydrant : CloneObject
{
/// <summary>
///位置
/// <summary>
public string Location{get;set;}
/// <summary>
///编号
/// <summary>
public string Number{get;set;}
/// <summary>
///管径
/// <summary>
public string Diameter{get;set;}
/// <summary>
///牙口
/// <summary>
public string Mouth{get;set;}
/// <summary>
///状态
/// <summary>
public string State{get;set;}
}
public class OutdoorHydrantReactive: CloneObjectReactive,ISetData<OutdoorHydrant>
{
/// <summary>
///位置
/// <summary>
public ReactiveProperty<string> Location{get;set;}
/// <summary>
///编号
/// <summary>
public ReactiveProperty<string> Number{get;set;}
/// <summary>
///管径
/// <summary>
public ReactiveProperty<string> Diameter{get;set;}
/// <summary>
///牙口
/// <summary>
public ReactiveProperty<string> Mouth{get;set;}
/// <summary>
///状态
/// <summary>
public ReactiveProperty<string> State{get;set;}
public OutdoorHydrantReactive()
{
Data = new OutdoorHydrant();
Location = new ReactiveProperty<string>();
Location.Subscribe(value => ((OutdoorHydrant)Data).Location= value);
Number = new ReactiveProperty<string>();
Number.Subscribe(value => ((OutdoorHydrant)Data).Number= value);
Diameter = new ReactiveProperty<string>();
Diameter.Subscribe(value => ((OutdoorHydrant)Data).Diameter= value);
Mouth = new ReactiveProperty<string>();
Mouth.Subscribe(value => ((OutdoorHydrant)Data).Mouth= value);
State = new ReactiveProperty<string>();
State.Subscribe(value => ((OutdoorHydrant)Data).State= value);
}
public void SetData(OutdoorHydrant data)
{
base.SetData(data);
Id.Value = data.Id;
Parent.Value = data.Parent;
ImageUrl.Value = data.ImageUrl;
ImageType.Value = data.ImageType;
Location.Value = data.Location;
Number.Value = data.Number;
Diameter.Value = data.Diameter;
Mouth.Value = data.Mouth;
State.Value = data.State;
}
}