public void SendSensorIsActiveChangedRequest(bool IsActive)
        {
            var msg = new ChangeMySensorActivityMsg();

            msg.EntityId = m_block.EntityId;
            msg.IsActive = IsActive;

            Sync.Layer.SendMessageToAll(ref msg, MyTransportMessageEnum.Success);
        }
        static void ChangeSensorIsActiveSuccess(ref ChangeMySensorActivityMsg msg, MyNetworkClient sender)
        {
            MyEntity entity;

            MyEntities.TryGetEntityById(msg.EntityId, out entity);
            var block = entity as MySensorBlock;

            if (block != null)
            {
                block.IsActive = msg.IsActive;
            }
        }
Esempio n. 3
0
        static void ChangeSensorIsActiveRequest(ref ChangeMySensorActivityMsg msg, MyNetworkClient sender)
        {
            MyEntity entity;

            MyEntities.TryGetEntityById(msg.EntityId, out entity);
            var block = entity as MySensorBlock;

            if (block != null)
            {
                block.IsActive = msg.IsActive;
                Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId, MyTransportMessageEnum.Success);
            }
        }
Esempio n. 4
0
 static void ChangeSensorIsActiveSuccess(ref ChangeMySensorActivityMsg msg, MyNetworkClient sender)
 {
     MyEntity entity;
     MyEntities.TryGetEntityById(msg.EntityId, out entity);
     var block = entity as MySensorBlock;
     if (block != null)
     {
         block.IsActive = msg.IsActive;
     }
 }
Esempio n. 5
0
        public void SendSensorIsActiveChangedRequest(bool IsActive)
        {
            var msg = new ChangeMySensorActivityMsg();
            msg.EntityId = m_block.EntityId;
            msg.IsActive = IsActive;

            Sync.Layer.SendMessageToAll(ref msg, MyTransportMessageEnum.Success);
        }
Esempio n. 6
0
 static void ChangeSensorIsActiveRequest(ref ChangeMySensorActivityMsg msg, MyNetworkClient sender)
 {
     MyEntity entity;
     MyEntities.TryGetEntityById(msg.EntityId, out entity);
     var block = entity as MySensorBlock;
     if (block != null)
     {
         block.IsActive = msg.IsActive;
         Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId, MyTransportMessageEnum.Success);
     }
 }