コード例 #1
0
        public void SendFontSizeChangeRequest(float FontSize)
        {
            ChangeFontSizeMsg msg = new ChangeFontSizeMsg();

            msg.EntityId = m_block.EntityId;
            msg.FontSize = FontSize;

            Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Request);
        }
コード例 #2
0
        static void OnChangeFontSizeSucess(ref ChangeFontSizeMsg msg, MyNetworkClient sender)
        {
            MyEntity entity = null;

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

            if (block != null)
            {
                block.FontSize = msg.FontSize;
            }
        }
コード例 #3
0
        static void OnChangeFontSizeRequest(ref ChangeFontSizeMsg msg, MyNetworkClient sender)
        {
            MyEntity entity = null;

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

            if (block != null)
            {
                block.FontSize = msg.FontSize;
                Sync.Layer.SendMessageToAll(ref msg, MyTransportMessageEnum.Success);
            }
        }
コード例 #4
0
        public void SendFontSizeChangeRequest(float FontSize)
        {
            ChangeFontSizeMsg msg = new ChangeFontSizeMsg();

            msg.EntityId = m_block.EntityId;
            msg.FontSize = FontSize;

            Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Request);
        }
コード例 #5
0
 static void OnChangeFontSizeSucess(ref ChangeFontSizeMsg msg, MyNetworkClient sender)
 {
     MyEntity entity = null;
     MyEntities.TryGetEntityById(msg.EntityId, out entity);
     MyTextPanel block = entity as MyTextPanel;
     if (block != null)
     {
         block.FontSize = msg.FontSize;
     }
 }
コード例 #6
0
 static void OnChangeFontSizeRequest(ref ChangeFontSizeMsg msg, MyNetworkClient sender)
 { 
     MyEntity entity = null;
     MyEntities.TryGetEntityById(msg.EntityId, out entity);
     MyTextPanel block = entity as MyTextPanel;
     if (block != null)
     {
         block.FontSize = msg.FontSize;
         Sync.Layer.SendMessageToAll(ref msg, MyTransportMessageEnum.Success);
     }
 }