public void SendChangeFontColorRequest(Color color) { var msg = new ChangeFontColorMsg(); msg.EntityId = m_block.EntityId; msg.FontColor = color; Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Request); }
static void ChangeFontColorRequest(ref ChangeFontColorMsg msg, MyNetworkClient sender) { MyEntity entity; MyEntities.TryGetEntityById(msg.EntityId, out entity); if (entity is MyTextPanel) { Sync.Layer.SendMessageToAllAndSelf(ref msg, MyTransportMessageEnum.Success); } }
static void ChangeFontColorSuccess(ref ChangeFontColorMsg msg, MyNetworkClient sender) { MyEntity entity; MyEntities.TryGetEntityById(msg.EntityId, out entity); var textPanel = entity as MyTextPanel; if (textPanel != null) { textPanel.FontColor = msg.FontColor; } }