Ejemplo n.º 1
0
        public void SendChangeBackgroundColorRequest(Color backgroundColor)
        {
            var msg = new ChangeBackgroundColorMsg();

            msg.EntityId        = m_block.EntityId;
            msg.BackgroundColor = backgroundColor;

            Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Request);
        }
Ejemplo n.º 2
0
        static void ChangeBackgroundColorRequest(ref ChangeBackgroundColorMsg msg, MyNetworkClient sender)
        {
            MyEntity entity;

            MyEntities.TryGetEntityById(msg.EntityId, out entity);
            if (entity is MyTextPanel)
            {
                Sync.Layer.SendMessageToAllAndSelf(ref msg, MyTransportMessageEnum.Success);
            }
        }
Ejemplo n.º 3
0
        static void ChangeBackgroundColorSuccess(ref ChangeBackgroundColorMsg msg, MyNetworkClient sender)
        {
            MyEntity entity;

            MyEntities.TryGetEntityById(msg.EntityId, out entity);
            var textPanel = entity as MyTextPanel;

            if (textPanel != null)
            {
                textPanel.BackgroundColor = msg.BackgroundColor;
            }
        }
Ejemplo n.º 4
0
 static void ChangeBackgroundColorSuccess(ref ChangeBackgroundColorMsg msg, MyNetworkClient sender)
 {
     MyEntity entity;
     MyEntities.TryGetEntityById(msg.EntityId, out entity);
     var textPanel = entity as MyTextPanel;
     if (textPanel != null)
     {
         textPanel.BackgroundColor = msg.BackgroundColor;
     }
 }
Ejemplo n.º 5
0
 static void ChangeBackgroundColorRequest(ref ChangeBackgroundColorMsg msg, MyNetworkClient sender)
 {
     MyEntity entity;
     MyEntities.TryGetEntityById(msg.EntityId, out entity);
     if (entity is MyTextPanel)
     {
         Sync.Layer.SendMessageToAllAndSelf(ref msg, MyTransportMessageEnum.Success);
     }
 }
Ejemplo n.º 6
0
        public void SendChangeBackgroundColorRequest(Color backgroundColor)
        {
            var msg = new ChangeBackgroundColorMsg();

            msg.EntityId = m_block.EntityId;
            msg.BackgroundColor = backgroundColor;

            Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Request);
        }