public void SendChangeBackgroundColorRequest(Color backgroundColor) { var msg = new ChangeBackgroundColorMsg(); msg.EntityId = m_block.EntityId; msg.BackgroundColor = backgroundColor; Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Request); }
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); } }
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; } }
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; } }
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); } }
public void SendChangeBackgroundColorRequest(Color backgroundColor) { var msg = new ChangeBackgroundColorMsg(); msg.EntityId = m_block.EntityId; msg.BackgroundColor = backgroundColor; Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Request); }