public Train(int address, string name, TrainSpeed speed, TrainFunctions functions)
 {
     Address   = address;
     Name      = name;
     Speed     = speed;
     Functions = functions;
 }
 public void SetSpeed(TrainSpeed speed)
 {
     Speed = speed;
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Speed)));
 }
        public void SendSpeed(double speed)
        {
            TrainSpeed trainSpeed = new TrainSpeed(speed);

            networkIdentity.GetSocket().Emit("TrainSpeed", new JSONObject(JsonUtility.ToJson(trainSpeed)));
        }