Exemplo n.º 1
0
        /// <summary>
        /// Proxies sync data to the lighting and siren sub components
        /// </summary>
        /// <param name="dataDic"></param>
        public void SetData(ELSVehicleFSData data)
        {
            int id = _vehicle.GetElsId();

            if (!data.Siren.Equals(null) && cachedElsID == data.Id && data.Id == id)
            {
                Utils.DebugWriteLine($"ELSVehicle.cs: Got siren data for vehicle {_vehicle.Handle} with cached id of {cachedElsID} and decor {id} with dict id {data.Id}");
                _siren.SetData(data.Siren);
            }
            if (!data.Light.Equals(null) && cachedElsID == data.Id && data.Id == id)
            {
                Utils.DebugWriteLine($"ELSVehicle.cs: Got light data for vehicle {_vehicle.Handle} with cached id of {cachedElsID} and decor {id} with dict id {data.Id}");
                _light.SetData(data.Light);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Proxies sync data to the lighting and siren sub components
 /// </summary>
 /// <param name="dataDic"></param>
 public void SetData(IDictionary <string, object> data)
 {
     _siren.SetData((IDictionary <string, object>)data["siren"]);
     _light.SetData((IDictionary <string, object>)data["light"]);
 }
Exemplo n.º 3
0
        /// <summary>
        /// Proxies sync data to te lighting and siren sub components
        /// </summary>
        /// <param name="dataDic"></param>
        internal void SetSyncDataSets(IDictionary <string, object> dataDic)
        {
            var sirenDic = dataDic["siren"];

            _siren.SetData(dataDic);
        }