コード例 #1
0
 public void ReciveTrainInfo(TrainInfo info)
 {
     if (TrainsDictionary.Keys.FirstOrDefault(a => a.Name == info.BaseTrain.Number) == null && tempProxy != null)
     {
         var train = new TrainUI
         {
             Name            = info.BaseTrain.Number,
             Location        = info.TrainPosition,
             PassangersCount = info.BaseTrain.CurrentPassengers,
             Speed           = int.Parse(info.BaseTrain.Speed.ToString())
         };
         TrainsDictionary.Add(train, tempProxy);
         Trains.Add(train);
         tempProxy = null;
     }
 }
コード例 #2
0
ファイル: ControlPanel.cs プロジェクト: foozc/ScriptArchive
	// Use this for initialization
	void Start()
	{
		eui = UIManager.getInstance().equipKnowUI;
		train = UIManager.getInstance().trainUI;
	}