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; } }
// Use this for initialization void Start() { eui = UIManager.getInstance().equipKnowUI; train = UIManager.getInstance().trainUI; }