예제 #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);
        }
예제 #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);
            }
        }
예제 #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;
            }
        }
예제 #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;
     }
 }
예제 #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);
     }
 }
예제 #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);
        }